https://github.com/devopsx/action-jjb
Jenkins Job Builder github action
https://github.com/devopsx/action-jjb
jenkins jenkis-job-builder
Last synced: 4 months ago
JSON representation
Jenkins Job Builder github action
- Host: GitHub
- URL: https://github.com/devopsx/action-jjb
- Owner: devopsx
- Created: 2021-07-18T01:26:06.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-12-28T05:06:33.000Z (6 months ago)
- Last Synced: 2025-01-02T18:02:42.008Z (6 months ago)
- Topics: jenkins, jenkis-job-builder
- Language: Shell
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Jenkins Job Builder action
This action launches [Jenkins Job Builder](https://jenkins-job-builder.readthedocs.io/en/latest/) to update your Jenkins jobs.
## Example
```yaml
name: jjbon:
push:
paths:
- jenkins/jobs/** # job definitions here, searched recursivelyjobs:
jjb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: devopsx/action-jjb@master
with:
jjb_user: ${{ vars.JJB_USER }}
jjb_password: ${{ secrets.JJB_PASSWORD }}
jjb_dir: jenkins/jobs # Same dir with definitions as in push stanza
jjb_ini: jenkins/jenkins_jobs.ini # See example
```## Configuration
1. Create a dedicated github account in Jenkins, and an [API token](https://www.jenkins.io/blog/2018/07/02/new-api-token-system/) for it.
2. Create `JJB_USER` variable (account from step 1) and `JJB_PASSWORD` (token from step 1) [secret](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository) in repository settings.
3. Add workflow yaml, as described above.That's it!