Reputation: 1510
I have a code management app that integrates with Jenkins via CLI, creating, deleting and building jobs. After I create a new Jenkins job, I need to run a shell script. This script depends on some directories created by Jenkins, namely the workspace.
Jenkins CLI is non blocking, thus I can't just wait for the command to terminate. Is it possible, maybe with a plugin (I couldn't find any...), to trigger the execution of a shell script post job creation?
Upvotes: 1
Views: 1284
Reputation: 106
jenkins CLI command build
has the command option -s
which will block the trigger action until is finished.
See YOUR_JENKINS_URL/cli
Upvotes: 1