Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.13 KB

README.md

File metadata and controls

34 lines (26 loc) · 1.13 KB

Jenkins Job Builder action

This action launches Jenkins Job Builder to update your Jenkins jobs.

Example

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

Configuration

  1. Create a dedicated github account in Jenkins, and an API token for it.
  2. Create JJB_USER variable (account from step 1) and JJB_PASSWORD (token from step 1) secret in repository settings.
  3. Add workflow yaml, as described above.

That's it!