Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IT-division Public
dockerimages
centosfpmcookery
Commits
210acf90
Commit
210acf90
authored
Feb 18, 2020
by
Torstein Leversund
Browse files
generic build
parent
a7f6af88
Pipeline
#8541
failed with stage
in 12 seconds
Changes
1
Pipelines
14
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
210acf90
...
@@ -2,12 +2,6 @@ image: docker:19.03.1
...
@@ -2,12 +2,6 @@ image: docker:19.03.1
stages
:
stages
:
-
build
-
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
:
before_script
:
-
echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
-
echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
...
@@ -15,20 +9,8 @@ before_script:
...
@@ -15,20 +9,8 @@ before_script:
build
:
build
:
stage
:
build
stage
:
build
script
:
script
:
-
docker build --pull -t $TEST_IMAGE .
-
docker pull $CI_REGISTRY_IMAGE:latest ||
true
-
docker push $TEST_IMAGE
-
docker build --cache-from $CI_REGISTRY_IMAGE:latest
--tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:latest .
test
:
-
docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
stage
:
test
-
docker push $CI_REGISTRY_IMAGE:latest
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment