Skip to content
message-circle

GitHub Action

Jenkins Job Builder

v1 Latest version

Jenkins Job Builder

message-circle

Jenkins Job Builder

Updates Jenkins Jobs

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Jenkins Job Builder

uses: devopsx/gha-jjb@v1

Learn more about this action in devopsx/gha-jjb

Choose a version

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@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

Configuration

  1. Create Jenkins API token.
  2. Use it to create JENKINS_TOKEN secret in repo settings.
  3. Add workflow yaml, as described above.

That's it!