Commit 210acf90 authored by Torstein Leversund's avatar Torstein Leversund
Browse files

generic build

parent a7f6af88
Pipeline #8541 failed with stage
in 12 seconds
......@@ -2,12 +2,6 @@ image: docker:19.03.1
stages:
- build
- test
- release
variables:
TEST_IMAGE: git.app.uib.no:4567/itpublic/dockerimages/centosfpmcookery:$CI_COMMIT_REF_NAME
RELEASE_IMAGE: git.app.uib.no:4567/itpublic/dockerimages/centosfpmcookery:latest
before_script:
- echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
......@@ -15,20 +9,8 @@ before_script:
build:
stage: build
script:
- docker build --pull -t $TEST_IMAGE .
- docker push $TEST_IMAGE
test:
stage: test
script:
- docker pull $TEST_IMAGE
release:
stage: release
script:
- docker pull $TEST_IMAGE
- docker tag $TEST_IMAGE $RELEASE_IMAGE
- docker push $RELEASE_IMAGE
only:
- master
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest
--tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE:latest
Markdown is supported
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