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@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
- Create a dedicated github account in Jenkins, and an API token for it.
- Create
JJB_USER
variable (account from step 1) andJJB_PASSWORD
(token from step 1) secret in repository settings. - Add workflow yaml, as described above.
That's it!