Skip to content

Commit

Permalink
Allow unshelving pending changelists for git-based pipelines (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
ca-johnson authored Jun 29, 2020
1 parent 57b20e3 commit 25e7634
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/buildkite.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ def set_metadata(key, value, overwrite=False):

def get_users_changelist():
"""Get the shelved changelist supplied by the user, if applicable"""
# Overrides the CL to unshelve via plugin config
# TODO: Remove this to discourage git-based pipelines that sync perforce
shelved_cl = os.environ.get('BUILDKITE_PLUGIN_PERFORCE_SHELVED_CHANGE')
if shelved_cl:
return shelved_cl

branch = os.environ.get('BUILDKITE_BRANCH', '')
if branch.isdigit():
return branch
Expand Down

0 comments on commit 25e7634

Please sign in to comment.