79475066

Date: 2025-02-28 09:39:29
Score: 0.5
Natty:
Report link

I've fixed this issue: Move the rules from job myjob to .template, because SOURCE_PARAMETER and CLASSIFICATION are outside variable for .template:

.template:
  tags:
    - xxx_cicd_test
  allow_failure: false
  script:
    - echo "SOURCE_PARAMETER:$SOURCE_PARAMETER"
    - bash scripts/build.sh $CLASSIFICATION
  rules:
    - if: $SOURCE_PARAMETER == "$CLASSIFICATION"

myjob:
  extends: .template
  parallel:
    matrix:
    - CLASSIFICATION: "param_1"
    - CLASSIFICATION: "param_2"
    - CLASSIFICATION: "param_3" 
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: wssbygone