Я выяснил источник этих дополнительных шагов и как избавиться от них, изменив свой Jenkinsfile.
Изначально мой Jenkinsfile выглядит как
pipeline {
agent { dockerfile true } // causes the "Declarative Agent Setup" stage
options {
ansiColor('xterm')
}
stages {
...
}
post { // causes the "Declarative Post Actions" stage
...
}
}
Declarative Checkout SCM
- это поведение по умолчанию при настройке конвейера для использования Pipeline script from SCM
.
После того, как я обновил свой Jenkinsфайл в
pipeline {
agent { label 'docker' } // Not using dockerfile directly to prepare the agent
options {
ansiColor('xterm')
skipDefaultCheckout() // removes the "Declarative Checkout SCM" stage
}
stages {
stage ('Checkout') {
checkout scm
}
}
post { // causes the "Declarative Post Actions" stage
...
}
}
Мне удалось избавиться от Declarative Agent Setup
и Declarative Checkout SCM
До сих пор не знаю, как исправить разрыв