I want to pass some variables between jobs (on other stages) in my gitlab-ci scrypt. I used as in example:
buildTest:
stage: build
artifacts:
reports:
dotenv: build.env
name: "FullRelease"
paths:
- 'app'
expire_in: 1 day
script: |
echo "version=1.2.3" >> build.env
....
runWin:
stage: runOnWin
variables:
GIT_STRATEGY: none
script: |
echo "Version is %version%"
needs:
- job: buildTest
artifacts: true
All is work, but I've got all artifacts from 'buildTest' (whole folder app, which is big). It's a bit strange, but it doesn't contains file 'build.env', which is only I need. Is there any possibility to pass only variables, without other artifacts. If I set artifacts: false - no variables are passed.