Skip to content

Mercurial extension for triggering jenkins jobs

License

Notifications You must be signed in to change notification settings

shyam334/poke-jenkins

 
 

Repository files navigation

poke-jenkins: Mercurial extension for triggering jenkins jobs

The poke-jenkins is a Mercurial extension that for the heads of an incoming changeset starts a Jenkins job.

image

image

image

Installation

sh

pip install poke-jenkins

Configuration

An example of .hg/hgrc of your remote repository:

[extensions]
poke_jenkins =

[poke_jenkins]

# Jenkins url
jenkins_base_url = http://ci.example.com

# List the jobs you want to start
jobs = Project_Tests_Dev Project_Coverage_Dev

# Feel free to change this parameter
tag = foo

# The url which Jenkins will use to clone the repository
repo_url = ssh://code.example.com//example

# Timeout in seconds
timeout = 10

# Jenkins user id
username = foo

# Jenkins API Token
password = bar

# Branch regular expression filter
branch_regex = ^c\d{4}

Usage

With given configuration above, it will call jenkins jobs to start builds:

  • http://ci.example.com/job/Project_Tests_Dev?TAG=foo&NODE_ID=<mercurial commit hash>&BRANCH=<branch name>&REPO_URL=ssh://code.example.com//example
  • http://ci.example.com/job/Project_Coverage_Dev?TAG=foo&NODE_ID=<mercurial commit hash>&BRANCH=<branch name>&REPO_URL=ssh://code.example.com//example

It will add basic auth headers to authenticate the calls if username and password settings are set.

Python3 support

Package itself supports python3 out of the box, but not mercurial ATM.

Contact

If you have questions, bug reports, suggestions, etc. please create an issue on the GitHub project page.

License

This software is licensed under the MIT license

See License

© 2013 Paylogic International.

About

Mercurial extension for triggering jenkins jobs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%