diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-04-07 15:50:00 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-04-07 15:50:00 +0300 |
commit | 73e84ff5e06db7590d15bb2123f522c1b532463e (patch) | |
tree | 4893f6147d58edadc968b9ca521e681ef22239ff | |
parent | f05cbe308d9df4290208758e05b7403f57f18364 (diff) |
Starting checking envvars with PUBLISH_TOKEN, then PUBLISH_KEY.
Many of existing jobs inject PUBLISH_KEY ennvar into build process, so for
them one would need to either explicitly remove such injection, or call
linaro-cp with --api_version=2, both of which are extra changes which
complicate testing. With change, a job can be easily switch between API
v1 or v2 just by presence of "Linaro publishing token" build step.
Change-Id: I9b8df357a9925be7f7f75c76868922a81ff4e822
-rwxr-xr-x | linaro-cp.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/linaro-cp.py b/linaro-cp.py index 85997af..698b69c 100755 --- a/linaro-cp.py +++ b/linaro-cp.py @@ -172,12 +172,12 @@ def main(): if arguments.key: key = arguments.key else: - key = os.environ.get('PUBLISH_KEY') - if key is None: - key = os.environ.get('PUBLISH_TOKEN') - if key: - arguments.api_version = '2' - else: + key = os.environ.get('PUBLISH_TOKEN') + if key: + arguments.api_version = '2' + else: + key = os.environ.get('PUBLISH_KEY') + if key is None: sys.exit('Error: Key is not defined.') if not arguments.build_info: |