Gitlab CI - pass variable between stages

Moki Lv6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
build:
stage: build
script:
- echo "BUILD_VERSION=hello" >> build.env
artifacts:
reports:
dotenv: build.env

deploy:
stage: deploy
script:
- echo $BUILD_VERSION # => hello
dependencies:
- build
On this page
Gitlab CI - pass variable between stages