Skip to content

Commit bb942ce

Browse files
updated variables in build stage for CLEAN_TAG and passing it to artifacts
Change-Id: I7b03d96e7f097350666e94167d636d558cb5103f
1 parent ae0736f commit bb942ce

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.gitlab-ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ build-docker:
1313
- if: $CI_COMMIT_TAG =~ /.+/
1414
variables:
1515
VID: $CI_COMMIT_TAG
16-
CLEAN_TAG: ""
16+
1717
- when: manual
1818
stage: build
1919
before_script:
2020
- apk update
2121
- apk add --no-cache git
2222

2323
script:
24-
- CLEAN_TAG="${CI_COMMIT_TAG:1}"
25-
- docker build -f Dockerfile -t korap/kustvakt:$CLEAN_TAG .
26-
- docker save korap/kustvakt:$CLEAN_TAG | xz > kustvakt-$CLEAN_TAG.tar.xz
24+
- clean_tag="${CI_COMMIT_TAG:1}"
25+
- echo "CLEAN_TAG=$(clean_tag)" >> $GITLAB_ENV
26+
- docker build -f Dockerfile -t korap/kustvakt:$clean_tag .
27+
- docker save korap/kustvakt:$clean_tag | xz > kustvakt-$clean_tag.tar.xz
2728
artifacts:
2829
paths:
2930
- kustvakt-$CLEAN_TAG.tar.xz

0 commit comments

Comments
 (0)