3

I am trying to configure multi-branch pipelines with blueocean.

Previously I was using post build actions to send notifications and triggering other tasks depends on the build status like in here:

post-build action

Currently I'm looking for similar feature in multi-branch pipelines.

But couldn't find anything regarding to post build actions in old interface and in blueocean pipeline editor.

Jenkins default:

multi-branch pipeline

BlueOcean:

enter image description here

mirza
  • 5,685
  • 10
  • 43
  • 73

1 Answers1

3

Since you are using pipeline, the post build actions go into the pipeline code(i.e., Jenkinsfile) configured under 'Build Configuration' in classic view.

post section can be placed either in pipeline scope or stage scope.

  • In pipeline scope, it should be right after stages block.
  • In stage scope, post section can be placed after any stage block.

Example to call post build action at the end of the pipeline is below.

pipeline {
    node any
    stages {
        stage('one') {

        }
        stage('two') {
        }
    } // end of stages block
    post {
        <checkstyle step>
    } //post block in pipeline scope
}
dot
  • 597
  • 1
  • 4
  • 25