This action builds a jenkins job with parameters. (Single Job)
https://www.jenkins.io/blog/2018/07/02/new-api-token-system/ (Required)
i.e https://your-jenkins-site.com (Required)
user owner of the token (Required)
Jenkins job name
i.e Production-deployment-pipeline (Required)
Not mandatory
Wait for the job build status
values
"wait" #Default
"no-wait"
Not mandatory
Set jenkins params as JSON string:
i.e
"{'param1': 'value1', 'param2': 'value2'}"
Not mandatory
Defaults to true
. Ignores errors and warning about SSL certificates if set to false
.
Doing so is insecure, but for self-hosted runners with self-signed certificates if may be useful.
- FAILURE
- SUCCESS
- ABORTED
- EXECUTED
- name: Build single job
uses: Mondtic/build-jenkins-job@master
with:
jenkins-url: ${{ secrets.JENKINS_URL }}
jenkins-token: ${{ secrets.JENKINS_TOKEN }}
jenkins-user: ${{ secrets.JENKINS_USER }}
jenkins-job: ${{ secrets.JENKINS_JOB }}
jenkins-job-params: "{'stringparam': 'stringvalue', 'booleanparam': false}"
jenkins-wait-job: "no-wait"
jenkins-ssl-verify: "true"
If your job needs params and you want to use the default params, you will need to set Jenkins-job-params: "{'any_param': 'any_value'}" otherwise, you will receive a 400 Bad request error.