Sign inSign up

osmman/jenkins-job-builder

By osmman

Updated over 5 years ago

Jenkins Job Builder takes descriptions of jobs in YAML format and uses them to configure Jenkins.

Image
3

10K+

osmman/jenkins-job-builder repository overview

GitHub release

Jenkins Job Builder

Jenkins Job Builder takes simple descriptions of Jenkins jobs in YAML or JSON format and uses them to configure Jenkins. You can keep your job descriptions in human readable text format in a version control system to make changes and auditing easier. It also has a flexible template system, so creating many similarly configured jobs is easy.

Usage

Print version
docker run osmman/jenkins-job-builder --version
Test a job definition

If you want to run a simple test with just a single YAML job definition file and see the XML output on stdout. Than you had to link your sources of job definitions from $PWD. It can be done by adding a data volume to a container using the -v flag.

docker run -v "$PWD":/tmp/jenkins-job osmman/jenkins-job-builder \
 test /tmp/jenkins-job/job.yaml
Updating jenkins jobs

When you’re satisfied with the generated XML from the test, you can run:

docker run -v "$PWD":/tmp/jenkins-job -w /tmp/jenkins-job \
osmman/jenkins-job-builder --conf jenkins_job.ini update job.xml

which will upload the job and view definitions to Jenkins if needed. This example has configuration file jenkins_job.ini located in source directory.

Deleting a job

To delete a job:

docker run -v "$PWD":/tmp/jenkins-job osmman/jenkins-job-builder \
 --conf jenkins_job.ini delete simple

The above command deletes the job simple from the Jenkins master.

Tag summary

Content type

Image

Digest

Size

329.7 MB

Last updated

about 6 years ago

docker pull osmman/jenkins-job-builder