This action creates/triggers a Jenkins job, waits for it to finish, and allows you to pass job parameters. This action also supports HTTPS and a custom port for Jenkins.
Your Jenkins token. See this post for information on how to generate one
Required
The URL should look like this: github.com
and not https://github.com
or github.com:8080
Required
The Jenkins user to use
Required
Required
E.g.
if job inside folder:
"job/folder_name/job/job_name"
if job in jenkins root:
"job/job_name"
The jenkins server port, the default port for HTTP (non-secure) is 80 and 443 for HTTPS (secure)
Required
Not mandatory
Set jenkins params as JSON string:
E.g.
"{\"param1\": \"value1\", \"param2\": \"value2\"}"
Not mandatory
Set to true if you are trying to connect to a HTTPS server, default is false
- FAILURE
- SUCCESS
- ABORTED
- name: "Trigger jenkins job"
uses: Paloudi/build-jenkins-job@master
with:
jenkins-url: ${{ secrets.JENKINS_URL }}
jenkins-port: ${{ secrets.JENKINS_PORT }}
jenkins-token: ${{ secrets.JENKINS_TOKEN }}
user: "jenkins-username"
job-path: "job/folder_name/job/job_name"
job-params: "{\"param1\": \"value1\", \"param2\": \"value2\"}"
is-secure: true
- name: Get job status
run: echo "Job status is ${{ steps.job-build.outputs.job_status }}"