-
Notifications
You must be signed in to change notification settings - Fork 117
Description
Hello,
As per the tutorial of integrating ReFrame into CI, ReFrame dynamically generates this pipeline.yml file for the tests user wants to do. Typically, this file has following contents:
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- rfm-stage/${CI_COMMIT_SHORT_SHA}
stages:
- rfm-stage-0
- rfm-stage-1
Test-1:
stage: rfm-stage-0
script:
<snippet>
artifacts:
paths:
- Test-1-report.json
needs: []
Test-2:
stage: rfm-stage-1
script:
<snippet>
artifacts:
paths:
- Test-2-report.json
needs:
- Test-1
The problem is that the generated CI file does not emit image name on the top of the file. So, docker executor fallback to default image defined in the runner configuration for these tests. Consequently, it works only when the CI pipeline uses default runner image and results in failed CI jobs when different image is used.
Usually, as developers, we use customised images for CI jobs which include all the packages, files and dependencies. Hence, it would be useful if ReFrame can emit image directive on the top of the generated CI file. GitLab gives the CI_JOB_IMAGE environment variables within CI and it can be used to emit the requested directive.