This action launches Jenkins Job Builder to update your Jenkins jobs.
name: jjb
on:
push:
paths:
- jenkins/jobs/** # job definitions here, searched recursively
jobs:
jjb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: devopsx/gha-jjb@master
with:
jenkins_token: ${{ secrets.JENKINS_TOKEN }}
jjb_dir: jenkins/jobs # same dir with definitions as in push stanza
jjb_ini: jenkins/jenkins_jobs.ini
- Create Jenkins API token.
- Use it to create
JENKINS_TOKEN
secret in repo settings. - Add workflow yaml, as described above.
That's it!