CI/CD: Artifact publishing issue on MacOS SaaS runner (variable evaluation issue?)

Hello,

I’ve moved one of my iOS build job from my local MacOS runner to a SaaS runner. Everything works fine, apart from artifact publishing (which works fine on my local runner = same yaml).

The issue seems to be in the variable evaluation.

When I have:

  artifacts:
    name: ${CI_JOB_NAME}_${CI_COMMIT_SHORT_SHA}
    paths:
     - ${ARTIFACT_PACKAGE_DIR}/${ARTIFACT_PACKAGE_NAME}

Artifact publishing fails with:
"WARNING: ${ARTIFACT_PACKAGE_DIR}/${ARTIFACT_PACKAGE_NAME}: no matching file"

I confirm that variables ${ARTIFACT_PACKAGE_DIR} and ${ARTIFACT_PACKAGE_NAME} are set. They are job variables:

variables:
    ARTIFACT_PACKAGE_DIR: "${APP_DIR}/${IOS_IPA_OUTPUT_DIR}"
    ARTIFACT_PACKAGE_NAME: "myApp_${CI_COMMIT_SHORT_SHA}.ipa"

and they are evaluated and used without issue in the after_script section.

Everything works fine when I change to:

  artifacts:
    name: ${CI_JOB_NAME}_${CI_COMMIT_SHORT_SHA}
    paths:
      - app/ios/build/myApp.ipa

I’m using this tag and image for the job:

  tags:
    - saas-macos-medium-m1
  image: macos-14-xcode-15

Is this a known issue ? Thanks for your help.

Also just realized that my artifact file is named _CI_JOB_NAME___CI_COMMIT_SHORT_SHA_.zip.

Any help much appreciated. Thanks.