GithubHelp home page GithubHelp logo

microbadger / docker-jenkins-job-builder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thefynx/docker-jenkins-job-builder

0.0 1.0 0.0 20 KB

A containerized version of the Jenkins Job Builder tool

License: MIT License

Ruby 100.00%

docker-jenkins-job-builder's Introduction

Dockerized Jenkins Job Builder

Build Status GitHub release Docker Automated buil Docker Stars Docker Pulls

A docker containerized version of the Jenkins Job Builder tool. A pre-built image is available via Docker Hub

Tags Explanation

Docker Tags

  • Latest: Last Tag Released
  • Tag: Equivalent to git tag
  • Dev: Any commits to Master branch

Tag Semantics

  • jjb_version.buildnumber

Example usage

Print version

Command:
docker run --interactive --tty --rm \
  thefynx/jenkins-job-builder \
  jenkins-jobs --version
Output:
Jenkins Job Builder version: See [Releases](https://github.com/TheFynx/docker-jenkins-job-builder/releases)

Test job definition

Assumptions:
  • You have a terminal open in the /example_job directory of this repo
Command:
docker run --interactive --tty --rm \
  --volume "$PWD":/opt/jenkins-job \
  --workdir /opt/jenkins-job \
  thefynx/jenkins-job-builder \
  jenkins-jobs test job.yml
Output:
INFO:root:Will use anonymous access to Jenkins if needed.
INFO:jenkins_jobs.builder:Number of jobs generated:  1
INFO:jenkins_jobs.builder:Job name:  hello-world
<?xml version="1.0" encoding="utf-8"?>
<project>
  <actions/>
  <description>Do not edit this job through the web!&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
  <keepDependencies>false</keepDependencies>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <concurrentBuild>false</concurrentBuild>
  <canRoam>true</canRoam>
  <properties/>
  <scm class="hudson.scm.NullSCM"/>
  <builders>
    <hudson.tasks.Shell>
      <command>echo 'Hello world!'</command>
    </hudson.tasks.Shell>
  </builders>
  <publishers/>
  <buildWrappers/>
</project>
INFO:jenkins_jobs.builder:Cache saved

Update job definition

Assumptions:
  • You have a terminal open in the /example_job directory of this repo
  • You have a jenkins server running at http://192.168.99.100:8080/
Command:
docker run --interactive --tty --rm \
  --volume "$PWD":/opt/jenkins-job \
  --workdir /opt/jenkins-job \
  thefynx/jenkins-job-builder \
  jenkins-jobs --conf jenkins.ini update job.yml
Output:
INFO:root:Will use anonymous access to Jenkins if needed.
INFO:root:Updating jobs in ['job.yml'] ([])
INFO:jenkins_jobs.builder:Number of jobs generated:  1
INFO:jenkins_jobs.builder:Reconfiguring jenkins job hello-world
INFO:root:Number of jobs updated: 1
INFO:jenkins_jobs.builder:Cache saved

Development

Building

docker build .

Testing

bundle install
bundle exec rspec

docker-jenkins-job-builder's People

Contributors

jsallis avatar thefynx avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.