Skip to content

Commit

Permalink
Merge pull request #68 from lsst/tickets/DM-24438
Browse files Browse the repository at this point in the history
DM-24438: Support a `refs` environment variable in Jenkins.
  • Loading branch information
ktlim committed Jun 3, 2020
2 parents 940e762 + 5230d04 commit 44bc195
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/lsst/verify/bin/dispatchverify.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
- ``PRODUCT``: the name of the product built, e.g. 'validate_drp'
- ``dataset``: the name of the dataset processed, e.g. 'validation_data_cfht'
- ``label``: the name of the platform where it runs
- ``refs``: the branches run by Jenkins, e.g. 'tickets/DM-12345 master'
If ``--lsstsw`` is used, additional Git branch information is included with
Science Pipelines package metadata.
Expand Down
2 changes: 2 additions & 0 deletions python/lsst/verify/metadata/jenkinsci.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def get_jenkins_env():
- ``'ci_label'``: Value of ``${label}`` environment variable in
Jenkins CI.
- ``'ci_url'``: URL to job page in Jenkins CI.
- ``'ci_refs'``: whitespace-delimited branch references
- ``'status'``: Job return status (always ``0``).
Examples
Expand All @@ -57,6 +58,7 @@ def get_jenkins_env():
'ci_name': os.getenv('PRODUCT', 'unknown'),
'ci_dataset': os.getenv('dataset', 'unknown'),
'ci_label': os.getenv('label', 'unknown'),
'ci_refs': os.getenv('refs', 'unknown'),
'ci_url': os.getenv('BUILD_URL', 'https://example.com'),
'status': 0,
}

0 comments on commit 44bc195

Please sign in to comment.