All Projects → bobuss → Python Jenkins Template

bobuss / Python Jenkins Template

Template for Jenkins jobs for python projects.

Labels

Projects that are alternatives of or similar to Python Jenkins Template

Devopicons
Heavily-optimised version of the Devicons icon-font.
Stars: ✭ 104 (-3.7%)
Mutual labels:  makefile
Kamasutra Cn
那啥经(梵汉对照)- for Chinese only
Stars: ✭ 106 (-1.85%)
Mutual labels:  makefile
Rprogdatascience
Stars: ✭ 108 (+0%)
Mutual labels:  makefile
Ecs Refarch Cloudformation
A reference architecture for deploying containerized microservices with Amazon ECS and AWS CloudFormation (YAML)
Stars: ✭ 1,497 (+1286.11%)
Mutual labels:  makefile
Makefile For The Front End
A decent Makefile for fast prototyping and a good development experience.
Stars: ✭ 105 (-2.78%)
Mutual labels:  makefile
Awesome Safety Critical
List of resources about programming practices for writing safety-critical software.
Stars: ✭ 1,425 (+1219.44%)
Mutual labels:  makefile
Bsdowl
A highly portable build system targeting modern UNIX systems. Supports C, OCaml, TeX, METAPOST, NOWEB, M4, and more. Based on BSD Make.
Stars: ✭ 103 (-4.63%)
Mutual labels:  makefile
Jmuduo
imitate a net library named muduo written by ChenShuo
Stars: ✭ 108 (+0%)
Mutual labels:  makefile
D3 Bootstrap
[DEPRECATED] d3-friendly versions of Twitter bootstrap JavaScript tools
Stars: ✭ 105 (-2.78%)
Mutual labels:  makefile
Emotional Labor Assessment
Stars: ✭ 106 (-1.85%)
Mutual labels:  makefile
Yii2 Cookbook
Yii 2.0 Community Cookbook
Stars: ✭ 1,397 (+1193.52%)
Mutual labels:  makefile
Make.go
A Go script that could replace your Makefile.
Stars: ✭ 105 (-2.78%)
Mutual labels:  makefile
Crkbd
Corne keyboard, a split keyboard with 3x6 column staggered keys and 3 thumb keys.
Stars: ✭ 2,056 (+1803.7%)
Mutual labels:  makefile
Operating System
🔰 Home Assistant Operating System
Stars: ✭ 1,920 (+1677.78%)
Mutual labels:  makefile
Pingprom
Prometheus uptime monitoring quickstart
Stars: ✭ 107 (-0.93%)
Mutual labels:  makefile
Gdm3setup
An interface to configure GDM3, autologin options and change Shell theme
Stars: ✭ 103 (-4.63%)
Mutual labels:  makefile
Os
Open source security/privacy focused AOSP rom
Stars: ✭ 106 (-1.85%)
Mutual labels:  makefile
Beyondinteraction
openFrameworks examples for the book "Beyond Interaction".
Stars: ✭ 108 (+0%)
Mutual labels:  makefile
Urlmock
A Cocoa framework for mocking and stubbing URL requests and responses.
Stars: ✭ 107 (-0.93%)
Mutual labels:  makefile
Graphviz Scripts
Some dot files for graphviz
Stars: ✭ 106 (-1.85%)
Mutual labels:  makefile

Jenkins python template

Use these files to scaffold your Continuous Integration Server within your python projects.

This was inspirated by the PHP jenkins template project (github) by Sebastian Bergmann.

Requirements

On your jenkins instance, you must install some QA python tools:

Jenkins Plugins

You also need to install some plugins in your jenkins server:

Jenkins configuration

Install the hudson.plugins.warnings.WarningsPublisher.xml file on the jenkins server, then reload the configuration.

Or, if you prefer to click in the web interface:

  1. Go to Manage Jenkins -> Configure System

  2. Scroll down to Compiler Warnings -> Parsers

  3. Add a new parser with the following details:

    1. Name and others descriptive fields:

       PyFlakes
      
    2. Regular Expression:

       ^\s*(.*):(\d+):\s*(.*)$
      
    3. Mapping Script:

       import hudson.plugins.warnings.parser.Warning
      
       String fileName = matcher.group(1)
       String lineNumber = matcher.group(2)
       String message = matcher.group(3)
      
       return new Warning(fileName, Integer.parseInt(lineNumber), "Dynamic Parser", "-", message);
      
    4. Example Log Message:

      src/fbproxy/fbresponse.py:2: 'json' imported but unused
      

Using the Job Template

  1. Check out the python-jenkins-template project from Git:

     cd $JENKINS_HOME/jobs
     git clone git://github.com/bobuss/python-jenkins-template.git python-template
     chown -R jenkins:nogroup python-template/
    
  2. Reload Jenkins' configuration, for instance using the Jenkins CLI:

     java -jar jenkins-cli.jar -s http://<jenkins_address>:<jenkins_port> reload-configuration
    
  3. Click on "New Job".

  4. Enter a "Job name".

  5. Select "Copy existing job" and enter "python-template" into the "Copy from" field.

  6. Click "OK".

  7. Disable the "Disable Build" option.

  8. Fill in your "Source Code Management" information.

  9. Configure a "Build Trigger", for instance "Poll SCM".

  10. Click "Save".

In your project

Get the Makefile and adapt it (source directory, tasks). Make sure to generate the right files (or change the jenkins config):

  • pyflakes.log
  • pylint.log
  • sloccount.sc
  • output.xml
  • coverage.xml
  • xunit.xml

You can also adapt your .gitignore file, in order to avoid to commit the generated files.

Some other resources

License

(The MIT License)

Copyright (c) 2012 Bertrand Tornil [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].