Giter VIP home page Giter VIP logo

jenkins-yml's Introduction

Define jobs from project

Render Jenkins job and execute commands from jenkins.yml. These two steps are completely independant.

jenkins_yml provide a python API to render a Jenkins job XML config from a YAML payload. It does not manage Jenkins I/O to effectively create the job. See Jenkins EPO to create jobs and schedule builds from GitHub.

Finally, jenkins_yml provide a simple yet pluggable CLI script to executes de tests commands from jenkins.yml.

Jenkins Job features

The purpose of Jenkins YML is not to expose all Jenkins features, but to setup a sane default set of features you expect from a CI, and ask you the question you value.

  • Define parameters and default values.
  • Define matrix job axis.
  • Define periodic job.
  • Target Jenkins node per build.
  • Search git clone reference in /var/lib/jenkins/references/<owner>/<repository>/. It's up to you to create a mirror clone here or not.
  • Set GitHub commit status to pending.
  • Parameterized revision.
  • Define after_script, always runned after build, even on abort.
  • Collect arctefacts from _ci/ directory. Full path is available in CI_ARTEFACTS env var.
  • Reads XUnit XML from _ci/xunit*.xml.
  • Reads coverage report from coverage.xml.
  • Globally disable jobs from Jenkins.

Setup

On your Jenkins executor, pip3 install jenkins-yml and then use jenkins-yml-runner as shell command.

jenkins.yml format

Put a jenkins.yml file at the root of the project. This file contains a mapping of JOB_NAME to scripts. For example:

app-lint: |
  flake8 app/

app-tests:
  axis:
    TOXENV: [py27, py34, py35]
  script: |
    tox -r

app-doc:
  script: |
    tox -e sphinx -r

To test a job, simply run:

JOB_NAME=app-test jenkins-yml-runner

jenkins-yml's People

Contributors

bersace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

toopy

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.