Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toptal/jenkins-job-trigger-action
GitHub Action for triggering Jenkins Jobs and wait build result.
https://github.com/toptal/jenkins-job-trigger-action
github-actions jenkins
Last synced: 3 months ago
JSON representation
GitHub Action for triggering Jenkins Jobs and wait build result.
- Host: GitHub
- URL: https://github.com/toptal/jenkins-job-trigger-action
- Owner: toptal
- Created: 2021-02-26T14:49:15.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T09:07:50.000Z (about 1 year ago)
- Last Synced: 2024-10-31T10:42:22.508Z (3 months ago)
- Topics: github-actions, jenkins
- Language: Ruby
- Homepage:
- Size: 28.3 KB
- Stars: 7
- Watchers: 103
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jenkins-job-trigger-action
Triggers Jenkins Jobs from GitHub actions
This action allows to trigger a job on Jenkins and get the build result.
```
name: Your GHA
on:
pull_request:
types: [opened, synchronize]jobs:
your_job_name:
name: Trigger Jenkins Job
runs-on: ubuntu-latest
steps:
- name: Trigger your-awesome-job-name job
uses: toptal/jenkins-job-trigger-action@master
with:
jenkins_url: "https://your.jenkins.url/"
jenkins_user: ${{ secrets.JENKINS_USER }}
jenkins_token: ${{ secrets.JENKINS_TOKEN }}
proxy: ${{ secrets.JENKINS_PROXY }}
job_name: "the-name-of-your-jenkins-job"
job_params: |
{
"param_1": "value_1",
"param_2": "value_2"
}
job_timeout: "3600" # Default 30 sec. (optional)
```### Inputs
* `jenkins_url`: **required** Jenkins instance URL
* `jenkins_user`: **required** User name used for authentication
* `jenkins_token`: **required** Jenkins API token that belongs to jenkins_user
* `job_name`: **required** for jobs stored in a folder use `{folder-name}/job/{job-name}`
* `job_params`: Valid JSON with key-value params passed to the job
* `job_timeout`: Number of seconds to wait for the action to finish (Default 30)
* `proxy`: Proxy URL, includes username and password
* `async`: Set to true if you want to just trigger the job and dont wait for it to complete (Default false)### Outputs
* `jenkins_job_url`: jenkins build URL if the scheduled job starts executing within given `job_timeout`