Coder Social home page Coder Social logo

jenkins_job_on_branch's Introduction

##jenkins_job_on_branch.py

Python script, that generates Jenkins job and view when new branch is pushed to Git.

Job XML is being generated from the Jinja2 template. Sample job template requires the following plugins:

  • Build Flow
  • EnvInject
  • Git Client

Configuration options can be defined in the configuration.ini file or via the command line. Script support several options, that can be listed by passing --help option to the script. Script can be run in the preview mode without actually modifiying anything by passing --dry-run or --preview to the command line.

##Usage:

usage: job_on_branch.py [-h] [-c CONFIG_PATH] [-a JENKINS_URL]
                        [-u JENKINS_USERNAME] [-p JENKINS_PASSWORD]
                        [-r REPOSITORY_PATH] [-t TEMPLATE_NAME]
                        [--template-location TEMPLATE_LOCATION]
                        [--job-prefix JOB_PREFIX] [--job-suffix JOB_SUFFIX]
                        [--view-prefix VIEW_PREFIX]
                        [--view-suffix VIEW_SUFFIX] [--dry-run]

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG_PATH, --config CONFIG_PATH
                        Path to configuration
  -a JENKINS_URL, --address JENKINS_URL
                        Jenkins server URL
  -u JENKINS_USERNAME, --username JENKINS_USERNAME
                        Jenkins username
  -p JENKINS_PASSWORD, --password JENKINS_PASSWORD
                        Jenkins password
  -r REPOSITORY_PATH, --repository REPOSITORY_PATH
                        Git repository location
  -t TEMPLATE_NAME, --template-name TEMPLATE_NAME
                        Jenkins job template name
  --template-location TEMPLATE_LOCATION
                        Jenkins job template location
  --job-prefix JOB_PREFIX
                        Jenkins job prefix
  --job-suffix JOB_SUFFIX
                        Jenkins job suffix
  --view-prefix VIEW_PREFIX
                        Jenkins view prefix
  --view-suffix VIEW_SUFFIX
                        Jenkins view suffix
  --dry-run, --preview  Execute script in preview mode, without actually
                        modifying Jenkins configuration

##License and Authors

Copyright 2015, Rostyslav Fridman

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

jenkins_job_on_branch's People

Contributors

rostyslavfridman avatar frostyslav avatar

Watchers

James Cloos avatar  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.