Refactor Jenkins pipeline to use 'agent any' for improved flexibility in execution environment

This commit is contained in:
Enno Gelhaus 2025-10-03 14:32:30 +02:00
parent ebbb64b9d8
commit 762384d45e
2 changed files with 2 additions and 7 deletions

View File

@ -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 {

View File

@ -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.