Skip to content

Instantly share code, notes, and snippets.

@SamStudio8
Last active June 21, 2022 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save SamStudio8/8a2176eaed05a803c42bf21f212eae6b to your computer and use it in GitHub Desktop.
Save SamStudio8/8a2176eaed05a803c42bf21f212eae6b to your computer and use it in GitHub Desktop.
job with variable profiles
# Nicer syntax but leads to ugly job names,
# and doesn't work when variables strings are long
# See https://gitlab.com/gitlab-org/gitlab/-/issues/362262
my-job:
extends: base-job
parallel:
matrix:
- OWLS: 1
CATS: 0
- OWLS: 0
CATS: 1
my-job:
extends: base-job
parallel:
matrix:
- MATRIX_NAME: ["hoot", "meow"]
rules:
- if: $MATRIX_NAME == "hoot"
variables:
OWLS: 1
CATS: 0
- if: $MATRIX_NAME == "meow"
variables:
OWLS: 0
CATS: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment