jobcontrol.job_conf¶
Functions to manage the job configuration
The job configuration is a YAML object (dict) containing (at least) the following keys:
- module - name of the module from wich to import the function
- function - name of the function to be called
- args - arguments to the function (list)
- kwargs - keyword arguments to the function (dictionary)
- dependencies - dependencies for this job
Additional “constructors” are available:
- !retval <n> will be replaced with return value of latest successful build for dependency job <n> (and job <n> must be specified as a dependency)
- [proposed] !cfg <name> will be replaced with global configuration option <name>
- [proposed] “system” objects, such as context, job configuration, ...
might be passed/accessed as well?
- execution context
- current job object
- current build object
- [proposed] !secret <name> value from “secret” configuration, usually used for storing passwords etc, on file.
Note: job configuration widgets need to manipulate the configuration, if we want to expose it in a nicer way – is there any way to do so while preserving formatting / comments in other parts of the document?
Job configuration:
jobs:
- name: my-job-name
title: A descriptive title
function: package.module:name
args: []
kwargs:
storage: {url: 'mongodb://...'}
input_storage: !retval 'other-job-name'
dependencies: ['other-job-name']
- name: other-job-name
title: Another descriptive title
function: package.module:othername
- jobcontrol.job_conf.prepare_args(args, build)[source]¶
Prepare arguments / kwargs by replacing placeholders with actual values from the context.