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
Test api
Commits
31783b7a
Commit
31783b7a
authored
Nov 24, 2021
by
Kaniz Fatema Tuly
Browse files
Update .gitlab-ci.yml
parent
04155f3b
Pipeline
#1199
failed with stages
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
31783b7a
...
...
@@ -8,7 +8,7 @@ image_build:
script
:
-
echo "Stage build, Dockerfile:"
-
cat Dockerfile
-
docker build -t
fa
stapi:$CI_PIPELINE_ID .
-
docker build -t
te
stapi:$CI_PIPELINE_ID .
code_test
:
stage
:
test
...
...
@@ -19,16 +19,16 @@ code_test:
container_deploy1
:
stage
:
deploy
script
:
-
docker run -d -p 80 --name my
fa
stapi-w1-$CI_PIPELINE_ID
fa
stapi:$CI_PIPELINE_ID
-
docker run -d -p 80 --name my
te
stapi-w1-$CI_PIPELINE_ID
te
stapi:$CI_PIPELINE_ID
-
docker ps
-
docker stop myf
a
stapi-w1-$CI_PIPELINE_ID
-
docker rm my
fa
stapi-w1-$CI_PIPELINE_ID
-
docker stop myf
te
stapi-w1-$CI_PIPELINE_ID
-
docker rm my
te
stapi-w1-$CI_PIPELINE_ID
deploy_test
:
stage
:
test
script
:
-
docker run -d -p 80 --name my
fa
stapi-test-$CI_PIPELINE_ID
fa
stapi:$CI_PIPELINE_ID
-
sleep 10 && curl $(ifconfig ens3 | grep "inet " | sed -e 's/.* inet //g' | sed -e 's/ .*//g'):$(docker port my
fa
stapi-test-$CI_PIPELINE_ID | grep 0.0.0 | grep "80/tcp" | sed -e 's/.*://g')
-
docker stop my
fa
stapi-test-$CI_PIPELINE_ID
-
docker rm my
fa
stapi-test-$CI_PIPELINE_ID
-
docker run -d -p 80 --name my
te
stapi-test-$CI_PIPELINE_ID
te
stapi:$CI_PIPELINE_ID
-
sleep 10 && curl $(ifconfig ens3 | grep "inet " | sed -e 's/.* inet //g' | sed -e 's/ .*//g'):$(docker port my
te
stapi-test-$CI_PIPELINE_ID | grep 0.0.0 | grep "80/tcp" | sed -e 's/.*://g')
-
docker stop my
te
stapi-test-$CI_PIPELINE_ID
-
docker rm my
te
stapi-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