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
Hübner, Jan-Ole
lab-containerization
Commits
7318ce4c
Commit
7318ce4c
authored
Sep 18, 2020
by
Nane Kratzke
Browse files
.gitlab-ci.yml hinzufügen
parent
9357954c
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
7318ce4c
stages
:
-
test
-
build
services
:
-
docker:dind
test
:
stage
:
test
image
:
"
python:3.9"
script
:
-
docker build -t web:test .
-
docker run -d -p 80:80 web:test
-
python -m pip install -r unit/Requirements.txt
-
python unit/tests.py http://localhost "Hello from Docker Container"
build
:
stage
:
build
script
:
-
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 push $CI_REGISTRY_IMAGE/web:$CI_COMMIT_SHA
-
docker push $CI_REGISTRY_IMAGE/web:latest
Write
Preview
Supports
Markdown
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