Giter Club home page Giter Club logo

python-continuum's Introduction

CONTINUUM

Continuum is a lightweight continuous integration tool: no web interface, no scheduler. It runs on command line and is triggered by cron.

Installation

You can install it using PIP, typing pip install continuum_ci. This will install the continuum script in you PATH. You may also download the archive, expand it and type in the created directory python setup.py install.

While calling continuum, you must pass the configuration file name on the command line:

continuum config.yml

Configuration

Configuration is in YAML format:

directory:  /tmp
email:
  smtp_host: smtp.foo.com
  smtp_user: username
  smtp_pass: password
  recipient: [email protected]
  sender:    [email protected]
  success:   false

modules:
  continuum:
    url:     https://github.com/c4s4/continuum.git
    command: |
      set -e
      virtualenv env --no-site-packages
      . env/bin/activate
      pip install -r etc/requirements.txt
      bee test
  module2:
    url:     https://github.com/foo/bar.git
    command: |
      set -e
      commands to run the test

The first part indicates:

  • directory: the directory where modules will be checked out. Currently only GIT projects are supported.
  • email: put ~ if you don't want any email.

If you wait to receive email reports, provide following fields:

  • smtp_host: the hostname of your SMTP server.
  • smtp_user: the username to access SMTP server.
  • smtp_pass: the password to access SMTP server.
  • recipient: the email of the recipient of the build report.
  • sender: the email address if the sender of the report.
  • success: tells if continuum should send an email on success. If false, it will only send an email on build error.

If smtp_host, smtp_user and smtp_pass are not set, their value is extracted from MAIL_SMTP, MAIL_USERNAME and MAIL_PASSWORD environment variables.

The second one is the list of modules, with, for each module:

  • url: the URL of the module that GIT will use to get the sources.
  • command: the command to run tests, must return 0 on success and a different value on error (as any Unix script should). Note the pipe character (that is |) after the command: declaration.

The most important thing to remember about editting YAML is that Tab characters are forbidden (and should be replaced with spaces to properly indent). Please see YAML specification (at http://www.yaml.org/spec/1.2/spec.html) for more details.

Crontab

This script is triggered using cron, with as configuration as follows (in file /etc/crontab):

# run continuum at 4 every night
0   4 * * *  me    continuum /home/me/etc/continuum.yml

Please make sure that the PATH to continuum is defined in your cron configuration. You may add the right PATH at the beginning of your crontab file as following:

PATH=/path/to/continuum:/rest/of/my/path

# run continuum at 4 every night
0   4 * * *  me    continuum /home/me/etc/continuum.yml

Releases

  • 0.2.0 (2020-05-07): Using mail1 library.
  • 0.1.6 (2020-05-05): Bug fixed.
  • 0.1.5 (2020-05-05): Documentation fixed and added integration test.
  • 0.1.4 (2020-05-04): Migration to Python 3.
  • 0.1.3 (2020-05-04): Project renamed continuum_ci and added makefile.
  • 0.1.2 (2014-04-15): Fixed documentation.
  • 0.1.1 (2014-04-11): Improved email reporting.
  • 0.1.0 (2014-04-08): First public release.

Enjoy!

python-continuum's People

Contributors

c4s4 avatar

Stargazers

 avatar

Watchers

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