get_jenkins_env

lsst.verify.metadata.jenkinsci.get_jenkins_env()

Gather metadata entries from LSST DM Jenkins CI environment.

Returns:
prov : dict

Dictionary of metadata items obtained from the Jenkins CI environment. Fields are:

  • 'date': ISO8601-formatted current datetime.
  • 'ci_id': Job ID in Jenkins CI.
  • 'ci_name': Job name in Jenkins CI.
  • 'ci_dataset': Name of the dataset being processed.
  • 'ci_label': Value of ${label} environment variable in Jenkins CI.
  • 'ci_url': URL to job page in Jenkins CI.
  • 'status': Job return status (always 0).

Examples

This metadata is intended to be inserted into a job’s metadata:

>>> from lsst.verify import Job
>>> job = Job()
>>> job.meta.update(get_jenkins_env())