Skip to content
Snippets Groups Projects
Verified Commit 8f873277 authored by Varac's avatar Varac
Browse files

Use CI_PIPELINE_ID instead of CI_PIPELINE_IID

CI_PIPELINE_ID is exposed in gitlab CI web interface,
so droplets are more easy to debug.
parent 8bee516f
No related branches found
No related tags found
No related merge requests found
......@@ -89,4 +89,4 @@ terminate:
script:
# Remove droplet after successful tests
- cd test/
- python3 -c "import cosmos; cosmos.terminate_droplets_by_name(\"^ci-${CI_PIPELINE_IID}\$\")"
- python3 -c "import cosmos; cosmos.terminate_droplets_by_name(\"^ci-${CI_PIPELINE_ID}\$\")"
......@@ -116,11 +116,11 @@ if __name__ == "__main__":
# - 411: ci, ed25519
# - 407: varac
if "CI_PIPELINE_IID" in os.environ:
instance_id = os.environ['CI_PIPELINE_IID']
if "CI_PIPELINE_ID" in os.environ:
instance_id = os.environ['CI_PIPELINE_ID']
else:
# Use random generated ID in case we're not running in gitlab CI
# and there's no CI_PIPELINE_IID env var
# and there's no CI_PIPELINE_ID env var
instance_id = ''.join(
random.choice(string.ascii_lowercase + string.digits)
for _ in range(10))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment