This action runs a Jenkins job at a given URL with optional parameters.
inputs:
job_url:
description: 'URL for the Jenkins job. i.e. http://jenkins.company.io/job/some-folder/job/test'
required: true
jenkins_token:
description: 'Jekins API Token. 34 characters.'
required: true
jenkins_user:
description: 'Your Jenkins User ID.'
required: true
job_params:
description: 'JSON string of job parameters. i.e "{"foo": "bar", "baz": true, "qux": 3}" '
required: false
default: "{}"
outputs:
build_result:
description: 'Result of the Jenkins build; SUCCESS UNSTABLE FAILURE NOT_BUILT ABORTED'
- SUCCESS
- UNSTABLE
- FAILURE
- NOT_BUILT
- ABORTED
- uses: HoldenLucas/build-jenkins-job@v1
id: build
with:
job_url: ${{ secrets.JENKINS_URL }}/job/some-folder/job/test
jenkins_token: ${{ secrets.JENKINS_TOKEN }}
jenkins_user: ${{ secrets.JENKINS_USER }}
job_params: "{"foo": "bar", "baz": true, "qux": 3}"
- run: echo "Result: ${{ steps.build.outputs.build_result }}"