Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Triggering the LF Jenkins External Job

Here is an example script to put in your post-build step.

Code Block
languagebash
CRUMB=$(curl -s -u "${username}:${password}" 'https://jenkins.onap.org/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)')
curl -u "${username}:${password}" -H "$CRUMB" -X POST "https://jenkins.onap.org/job/lab-$JOB$EXT_JOB_NAME/buildWithParameters?SRC_BUILD_URL=${BUILD_URL}&LOG_DIR_URL=http://12.234.32.117/logs/job/$JOB_NAME/$BUILD_NUMBER/"

Use the username and password for the lab Jenkins user LF ID you created earlier.

The HTTP POST should be made to the endpoint corresponding to your External Job name.  Example: https://jenkins.onap.org/job/lab-windriver-beijing-oom-deploy/buildWithParameters

The key thing is that the External Job defined expects two parameters:

Any questions?  Contact Gary Wu or post to comments here.