module automation.jenkins_helper

Short summary

module ensae_teaching_cs.automation.jenkins_helper

Set up a jenkins server with all the necessary job

source on GitHub

Functions

function

truncated documentation

default_jenkins_jobs

Default list of Jenkins jobs.

engines_default

Returns a dictionary with default values for a Jenkins server.

get_interpreter

Returns the default interpreter.

setup_jenkins_server

Sets up many jobs on Jenkins.

Documentation

Set up a jenkins server with all the necessary job

source on GitHub

ensae_teaching_cs.automation.jenkins_helper.default_jenkins_jobs(filter=None, neg_filter=None, root=None, platform=None)[source]

Default list of Jenkins jobs.

Paramètres
  • filter – keep a subset of jobs (regular expression)

  • neg_filter – remove a subset of jobs (regular expression)

  • root – where to find yml project

  • platform – platform or None for the current one

Renvoie

list

It produces a subset of the following list of jobs:

    ('yml', 'https://raw.githubusercontent.com/sdpython/_automation/master/.local.jenkins.lin.yml', 'H H(0-1) * * 0')
    ('yml', 'https://raw.githubusercontent.com/sdpython/pymlbenchmark/master/.local.jenkins.lin.yml', 'H H(0-1) * * 1')
    ('yml', 'https://raw.githubusercontent.com/sdpython/_benchmarks/master/.local.jenkins.lin.yml', 'H H(0-1) * * 2')
    ('yml', 'https://raw.githubusercontent.com/sdpython/ensae_teaching_dl/master/.local.jenkins.lin.yml', 'H H(0-1) * * 3')
    ('yml', 'https://raw.githubusercontent.com/sdpython/machinelearningext/master/.local.jenkins.lin.yml', 'H H(0-1) * * 4')
    ('yml', 'https://raw.githubusercontent.com/sdpython/lecture_citation/master/.local.jenkins.lin.yml', 'H H(0-1) * * 5')
    ('yml', 'https://raw.githubusercontent.com/sdpython/botadi/master/.local.jenkins.lin.yml', 'H H(0-1) * * 6')
    ('yml', 'https://raw.githubusercontent.com/sdpython/pyquickhelper/master/.local.jenkins.lin.yml', 'H H(0-1) * * 0')
    ('yml', 'https://raw.githubusercontent.com/sdpython/jyquickhelper/master/.local.jenkins.lin.yml', 'H H(0-1) * * 1')
    ('yml', 'https://raw.githubusercontent.com/sdpython/python3_module_template/master/.local.jenkins.lin.yml', 'H H(0-1) * * 2')
    ('yml', 'https://raw.githubusercontent.com/sdpython/mathenjeu/master/.local.jenkins.lin.yml', 'H H(0-1) * * 3')
    ('yml', 'https://raw.githubusercontent.com/sdpython/pymmails/master/.local.jenkins.lin.yml', 'H H(0-1) * * 4')
    ('yml', 'https://raw.githubusercontent.com/sdpython/pymyinstall/master/.local.jenkins.lin.yml', 'H H(0-1) * * 5')
    ('yml', 'https://raw.githubusercontent.com/sdpython/pyensae/master/.local.jenkins.lin.yml', 'H H(0-1) * * 6')
    ('yml', 'https://raw.githubusercontent.com/sdpython/pyrsslocal/master/.local.jenkins.lin.yml', 'H H(0-1) * * 0')
    ('yml', 'https://raw.githubusercontent.com/sdpython/pysqllike/master/.local.jenkins.lin.yml', 'H H(0-1) * * 1')
    ('yml', 'https://raw.githubusercontent.com/sdpython/ensae_projects/master/.local.jenkins.lin.yml', 'H H(0-1) * * 2')
    ('yml', 'https://raw.githubusercontent.com/sdpython/ensae_teaching_cs/master/.local.jenkins.lin.yml', 'H H(0-1) * * 3')
    ('yml', 'https://raw.githubusercontent.com/sdpython/code_beatrix/master/.local.jenkins.lin.yml', 'H H(0-1) * * 4')
    ('yml', 'https://raw.githubusercontent.com/sdpython/actuariat_python/master/.local.jenkins.lin.yml', 'H H(0-1) * * 5')
    ('yml', 'https://raw.githubusercontent.com/sdpython/mlstatpy/master/.local.jenkins.lin.yml', 'H H(0-1) * * 6')
    ('yml', 'https://raw.githubusercontent.com/sdpython/jupytalk/master/.local.jenkins.lin.yml', 'H H(0-1) * * 0')
    ('yml', 'https://raw.githubusercontent.com/sdpython/teachpyx/master/.local.jenkins.lin.yml', 'H H(0-1) * * 1')
    ('yml', 'https://raw.githubusercontent.com/sdpython/tkinterquickhelper/master/.local.jenkins.lin.yml', 'H H(0-1) * * 2')
    ('yml', 'https://raw.githubusercontent.com/sdpython/cpyquickhelper/master/.local.jenkins.lin.yml', 'H H(0-1) * * 3')
    ('yml', 'https://raw.githubusercontent.com/sdpython/pandas_streaming/master/.local.jenkins.lin.yml', 'H H(0-1) * * 4')
    ('yml', 'https://raw.githubusercontent.com/sdpython/lightmlboard/master/.local.jenkins.lin.yml', 'H H(0-1) * * 5')
    ('yml', 'https://raw.githubusercontent.com/sdpython/lightmlrestapi/master/.local.jenkins.lin.yml', 'H H(0-1) * * 6')
    ('yml', 'https://raw.githubusercontent.com/sdpython/mlinsights/master/.local.jenkins.lin.yml', 'H H(0-1) * * 0')
    ('yml', 'https://raw.githubusercontent.com/sdpython/pyenbc/master/.local.jenkins.lin.yml', 'H H(0-1) * * 1')
    ('yml', 'https://raw.githubusercontent.com/sdpython/mlprodict/master/.local.jenkins.lin.yml', 'H H(0-1) * * 2')
    ('yml', 'https://raw.githubusercontent.com/sdpython/papierstat/master/.local.jenkins.lin.yml', 'H H(0-1) * * 3')
    ('yml', 'https://raw.githubusercontent.com/sdpython/sparkouille/master/.local.jenkins.lin.yml', 'H H(0-1) * * 4')
    ('yml', 'https://raw.githubusercontent.com/sdpython/manydataapi/master/.local.jenkins.lin.yml', 'H H(0-1) * * 5')
    ('yml', 'https://raw.githubusercontent.com/sdpython/csharpy/master/.local.jenkins.lin.yml', 'H H(0-1) * * 6')
    ('yml', 'https://raw.githubusercontent.com/sdpython/csharpyml/master/.local.jenkins.lin.yml', 'H H(0-1) * * 0')
    ('yml', 'https://raw.githubusercontent.com/sdpython/wrapclib/master/.local.jenkins.lin.yml', 'H H(0-1) * * 1')
    ('yml', 'https://raw.githubusercontent.com/sdpython/myblog/master/.local.jenkins.lin.yml', 'H H(0-1) * * 2')
    standalone [local_pypi] [py37]
    ('pymyinstall [update_modules] [py37]', 'H H(0-1) * * 5')

source on GitHub

ensae_teaching_cs.automation.jenkins_helper.engines_default(prefix='c:\\', prefix_python='c:\\', prefix_conda='c:\\', platform=None)[source]

Returns a dictionary with default values for a Jenkins server.

Paramètres
  • prefix – prefix for Jenkins location

  • prefix_python – prefix for Python distribution

  • prefix_conda – prefix for Anaconda or Miniconda distribution

  • platform – platform to use

Renvoie

dictionary

Avertissement

Virtual environment with conda must be created on the same disk as the original interpreter. The other scenario is not supported.

source on GitHub

ensae_teaching_cs.automation.jenkins_helper.get_interpreter(platform=None)[source]

Returns the default interpreter.

Paramètres

platform – platform

source on GitHub

ensae_teaching_cs.automation.jenkins_helper.setup_jenkins_server(js, github='sdpython', modules=None, overwrite=False, location=None, prefix='', delete_first=False, disable_schedule=False, fLOG=<function noLOG>)[source]

Sets up many jobs on Jenkins.

Paramètres
  • js – (JenkinsExt) jenkins server (specially if you need credentials)

  • github – github account if it does not start with http://, the link to git repository of the project otherwise

  • modules – modules for which to generate the Jenkins job (see default_jenkins_jobs which provides the default value if modules is None)

  • overwrite – do not create the job if it already exists

  • location – None for default or a local folder

  • prefix – add a prefix to the name

  • delete_first – remove all jobs first

  • disable_schedule – disable schedule for all jobs

  • fLOG – logging function

Renvoie

list of created jobs

modules is a list defined as follows:

  • each element can be a string or a tuple (string, schedule time) or a list

  • if it is a list, it contains a list of elements defined as previously

  • the job at position i is not scheduled, it will start after the last job at position i-1 whether or not it fails

source on GitHub