Как передать переменную в yml gitlab
Мне нужно передать переменную $PASSWORD из одного stage в другой как мне это сделать ?
stages:
- test
- build
- keys
- using_keys_pwsh
TestServer_Stage:
stage: test
tags:
- server
script:
- echo "Test stage on server:"
- whoami
- wget eth0.me -qO-
TestClient_Stage:
stage: test
tags:
- client
script:
- echo "Test stage on client:"
- whoami
- wget eth0.me -qO-
Build_Stage:
stage: build
tags:
- server
when: manual
script:
- echo "Stage build:"
- chmod +x ./scripts/server/*
- ./scripts/server/service.sh
- ./scripts/server/vault.sh
Receiving_Stage:
stage: keys
tags:
- server
when: manual
script:
- echo "Recieving keys stage:"
- sudo chmod +x ./scripts/password.sh
- PASSWORD="$(sudo ./scripts/password.sh)"
- echo $PASSWORD
Using_PWSH_Stage:
stage: using_keys_pwsh
tags:
- client
when: manual
script:
- sudo -p $PASSWORD pwsh
- ./script/ps1/dir.ps1