Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Kaniz Fatema Tuly
python-fastapi-example
Commits
3ca26881
Commit
3ca26881
authored
Oct 03, 2021
by
Kaniz Fatema Tuly
Browse files
ci file updated with deploy test
parent
e923ae85
Pipeline
#1201
failed with stages
in 0 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
3ca26881
...
...
@@ -22,4 +22,13 @@ container_deploy1:
-
docker run -d -p 80 --name myfastapi-w1-$CI_PIPELINE_ID fastapi:$CI_PIPELINE_ID
-
docker ps
-
docker stop myfastapi-w1-$CI_PIPELINE_ID
-
docker rm myfastapi-w1-$CI_PIPELINE_ID
\ No newline at end of file
-
docker rm myfastapi-w1-$CI_PIPELINE_ID
deploy_test
:
stage
:
test
script
:
-
docker run -d -p 80 --name myfastapi-test-$CI_PIPELINE_ID fastapi:$CI_PIPELINE_ID
-
sleep 10 && curl $(ifconfig ens3 | grep "inet " | sed -e 's/.* inet //g' | sed -e 's/ .*//g'):$(docker port myfastapi-test-$CI_PIPELINE_ID | grep 0.0.0 | grep "80/tcp" | sed -e 's/.*://g')
-
docker stop myfastapi-test-$CI_PIPELINE_ID
-
docker rm myfastapi-test-$CI_PIPELINE_ID
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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