Skip to content
Snippets Groups Projects
Commit e016ce3e authored by romanvalov's avatar romanvalov
Browse files

print environment variables

parent 36d1164c
Branches
No related tags found
1 merge request!1Mrtest
Pipeline #10902 passed
latest:
stage: test
script:
- echo 'test!'
include:
- local: '.gitlab-ci-template.yml'
.image-stable:
cache:
- key: image-stable
paths:
- smash.text
.image-latest:
cache:
- key: image-latest
paths:
- cache.text
build:
stage: build
variables:
A: (x y z)
B[0]: a
B[1]: b
B[2]: c
script:
- set -ex
- echo "$A" || :;
- echo "${A[@]}" || :;
- echo "${#A[@]}" || :;
- echo "${!A[@]}" || :;
- echo "$B" || :;
- echo "${B[@]}" || :;
- echo "${#B[@]}" || :;
- echo "${!B[@]}" || :;
- echo "STAMP=$RANDOM" | tee .env
- cat .env > cache.text
- cat .env > smash.text
cache:
- !reference [.image-stable, cache]
- !reference [.image-latest, cache]
artifacts:
expire_in: 1 min
paths:
- ./.env
latest:
stage: test
before_script:
- echo 'TEST?'
after_script:
- echo 'TEST.'
test:
stage: test
script:
- . .env
- echo "$STAMP"
- cat cache.text
- cat smash.text
- for m in `seq 1 30`; do echo $m; sleep 30; done
cache:
- !reference [.image-stable, cache]
- !reference [.image-latest, cache]
deploy:
stage: deploy
script:
- . .env
- echo "$STAMP"
- env
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment