From 762384d45ee572f71898f3d4f1161ce25dab0e7c Mon Sep 17 00:00:00 2001 From: Enno Gelhaus Date: Fri, 3 Oct 2025 14:32:30 +0200 Subject: [PATCH] Refactor Jenkins pipeline to use 'agent any' for improved flexibility in execution environment --- Jenkins/Build.Jenkinsfile | 4 +--- Jenkins/BuildPR.Jenkinsfile | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Jenkins/Build.Jenkinsfile b/Jenkins/Build.Jenkinsfile index 923bb392..b4924c91 100644 --- a/Jenkins/Build.Jenkinsfile +++ b/Jenkins/Build.Jenkinsfile @@ -1,9 +1,7 @@ // Declarative Pipeline for building Node.js application and running SonarQube analysis triggered by a push event. pipeline { // Defines the execution environment. Replace 'linux-agent' with your specific agent label. - agent { - label 'linux-agent' - } + agent any // Configure options, primarily to ensure full Git history is fetched for SonarQube and versioning. options { diff --git a/Jenkins/BuildPR.Jenkinsfile b/Jenkins/BuildPR.Jenkinsfile index 12be0457..49a6b868 100644 --- a/Jenkins/BuildPR.Jenkinsfile +++ b/Jenkins/BuildPR.Jenkinsfile @@ -1,10 +1,7 @@ // Declarative Pipeline for building Node.js application and running SonarQube analysis for a Pull Request. pipeline { // Defines the execution environment. Replace 'linux-agent' with your specific agent label. - agent { - label 'linux-agent' - } - + agent any // Configure options, primarily to ensure full Git history is fetched for SonarQube and versioning. options { // Skip the default checkout to manage it explicitly and ensure fetch-depth: 0.