Created
April 10, 2020 12:12
-
-
Save howtoautomateinth/0c09b6e8c71158ab80690a8307126ada to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: docker:18 | |
services: | |
- docker:dind | |
stages: | |
- default | |
- test | |
- deploy | |
default: | |
before_script: | |
- docker login -u ${DOCKER_USER} -p ${DOCKER_PASSWORD} | |
- docker build -t simpleapp . | |
test: | |
stage: test | |
script: | |
- docker run -p 5000:5000 -d --name simpleapp simpleapp | |
- docker ps | grep -q simpleapp | |
deploy: | |
stage: deploy | |
script: | |
- docker tag simpleapp howtoautomateinth/simpleapp-gitlab | |
- docker push howtoautomateinth/simpleapp-gitlab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment