ecc
ecc

Reputation: 1510

Is it possible to make Jenkins run a script after a job is created?

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

Answers (1)

wpl
wpl

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

Related Questions