Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hübner, Jan-Ole
lab-containerization
Commits
f2f8f8dd
Commit
f2f8f8dd
authored
Sep 18, 2020
by
Nane Kratzke
Browse files
Merge branch 'master' of
https://git.mylab.th-luebeck.de/cloud-native/lab-containerization
parents
91cf4c2d
65ddfdc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
f2f8f8dd
services
:
-
docker:dind
stages
:
stages
:
-
test
-
test
-
build
-
build
test
:
build-local-to-
test
:
stage
:
test
stage
:
test
image
:
docker:19.03.12
script
:
script
:
-
docker build -t web:test .
-
docker build -t web:test .
-
docker run -d -p 80:80 web:test
-
docker run -d -p 8888:80 web:test
-
curl http://localhost
-
sleep
5
-
wget http://docker:8888 --output-document fetched.html
-
cmp fetched.html web/index.html || echo "Wrong HTML document"
build
:
build
-to-publish
:
stage
:
build
stage
:
build
services
:
-
docker:dind
script
:
script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker build -t $CI_REGISTRY_IMAGE/web:
$CI_COMMIT_SHA
-t $CI_REGISTRY_IMAGE/web:latest .
-
docker build -t $CI_REGISTRY_IMAGE/web:
automatic
-t $CI_REGISTRY_IMAGE/web:latest .
-
docker push $CI_REGISTRY_IMAGE/web:
$CI_COMMIT_SHA
-
docker push $CI_REGISTRY_IMAGE/web:
automatic
-
docker push $CI_REGISTRY_IMAGE/web:latest
-
docker push $CI_REGISTRY_IMAGE/web:latest
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