updated variables in build stage for CLEAN_TAG and passing it to artifacts

Change-Id: I7b03d96e7f097350666e94167d636d558cb5103f
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index acba4a5..0864329 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,7 +13,7 @@
     - if: $CI_COMMIT_TAG =~ /.+/
       variables:
         VID: $CI_COMMIT_TAG
-        CLEAN_TAG: ""
+        
     - when: manual
   stage: build
   before_script:
@@ -21,9 +21,10 @@
     - apk add --no-cache git
 
   script:
-    - CLEAN_TAG="${CI_COMMIT_TAG:1}"
-    - docker build -f Dockerfile -t korap/kustvakt:$CLEAN_TAG .
-    - docker save korap/kustvakt:$CLEAN_TAG | xz > kustvakt-$CLEAN_TAG.tar.xz
+    - clean_tag="${CI_COMMIT_TAG:1}"
+    - echo "CLEAN_TAG=$(clean_tag)" >> $GITLAB_ENV
+    - docker build -f Dockerfile -t korap/kustvakt:$clean_tag .
+    - docker save korap/kustvakt:$clean_tag | xz > kustvakt-$clean_tag.tar.xz
   artifacts:
     paths:
       - kustvakt-$CLEAN_TAG.tar.xz