Refactor Jenkins pipeline to use 'agent any' for improved flexibility in execution environment
This commit is contained in:
parent
ebbb64b9d8
commit
762384d45e
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue