詹金斯声明式管道的管道级别的Post指令在失败时不会执行

时间:2019-01-03 09:45:35

标签: jenkins-pipeline pipeline declarative

下面是我的Jenkinsfile的框架。 post指令在成功时执行,但在失败时不执行。这是詹金斯的预期行为吗?

谢谢

#!/usr/bin/env groovy
pipeline {
  agent {
    node { label 'ent_linux_node' }
  }
  stages {
    stage('Prepare'){
      steps {
        //some steps
      }
    }
    stage('Build') {
      steps {
        //Fails at this stage
      }
    }
    stage('ArtifactoryUploads') {
      steps {
        //skips since previous stage failed
      }
    }
  }

  post {
    always {
      //Doesn't get executed but I am expecting it to execute
    }
  }
}

0 个答案:

没有答案