mirza
mirza

Reputation: 5793

Where is post build action on Jenkins - BlueOcean?

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

Upvotes: 3

Views: 5477

Answers (1)

dot
dot

Reputation: 627

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
}

Upvotes: 4

Related Questions