You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Jenkins Job Trigger
0.1.0
Trigger jenkins job in github action and wait for job completion.
Please see How to get the API Token for Jenkins
- Log in Jenkins.
- Click you name (upper-right corner).
- Click Configure (left-side menu).
- Use "Add new Token" button to generate a new one then name it.
- You must copy the token when you generate it as you cannot view the token afterwards.
- Revoke old tokens when no longer needed.
name | required | description |
---|---|---|
url | true |
Jenkins full URL including http/https protocol |
user_name | true |
User name of Jenkins |
api_token | true |
Jenkins API token |
job_name | true |
Jenkins job name |
parameter | false | Job parameter in JSON format. ex) {"param1":"value1"} |
wait | false | Set true as default. Waiting for job completion or not |
timeout | false | Set 600 seconds as default. Timeout (seconds) for github action. |
- name: Trigger jenkins job
uses: jabbukka/jenkins-trigger@master
with:
url: ${{ secrets.JENKINS_URL }}
user_name: ${{ secrets.JENKINS_USER }}
api_token: ${{ secrets.JENKINS_TOKEN }}
wait: "true"
timeout: "1000"