Skip to content
Snippets Groups Projects
Commit 9a1c1eca authored by Nandan Sadineni's avatar Nandan Sadineni
Browse files

Update .gitlab-ci.yml

parent 968d569a
Branches
Tags
1 merge request!1Nsadineni/test ci
Pipeline #192927 passed with stages
in 7 seconds
...@@ -4,7 +4,7 @@ stages: ...@@ -4,7 +4,7 @@ stages:
- release - release
variables: variables:
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
before_script: before_script:
...@@ -12,11 +12,9 @@ before_script: ...@@ -12,11 +12,9 @@ before_script:
build-except-master: build-except-master:
stage: build stage: build
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
script: script:
- docker build -t $IMAGE_TAG . - docker build -t $CONTAINER_TEST_IMAGE .
- docker push $IMAGE_TAG - docker push $CONTAINER_TEST_IMAGE
only: only:
- branches - branches
except: except:
...@@ -27,6 +25,10 @@ test: ...@@ -27,6 +25,10 @@ test:
script: script:
- docker pull $CONTAINER_TEST_IMAGE - docker pull $CONTAINER_TEST_IMAGE
- docker run $CONTAINER_TEST_IMAGE /bin/sh - docker run $CONTAINER_TEST_IMAGE /bin/sh
only:
- branches
except:
- master
release-image: release-image:
stage: release stage: release
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment