LoginSignup
1
0

More than 5 years have passed since last update.

Jenkinsfileのpostブロックでagentを指定する

Posted at

Declarative Pipelineでも、postブロックの中をscripted pipeline的に書くことでnodeを指定することができます。

post {
    always {
        node('master') {
            echo 'post block now'
            sh './cleanup.sh'
        }
        node('slave1') {
            sh './cleanup.sh'
        }
    }
}

参考:
https://stackoverflow.com/questions/44531003/how-to-use-post-steps-with-jenkins-pipeline-on-multiple-agents

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0