Commit 07e3c472 authored by dangdoan's avatar dangdoan

[dev]

parent 4ba24c3e
Pipeline #13015 failed with stages
in 13 seconds
...@@ -13,6 +13,7 @@ build: ...@@ -13,6 +13,7 @@ build:
- echo "To release new docker image for development and staging, we use tag 'dev' only !!!" - echo "To release new docker image for development and staging, we use tag 'dev' only !!!"
- export tag=dev - export tag=dev
- cicd_path=$(pwd)/cicd - cicd_path=$(pwd)/cicd
script: script:
- bash $cicd_path/build.sh - bash $cicd_path/build.sh
only: only:
......
...@@ -2,5 +2,8 @@ ...@@ -2,5 +2,8 @@
echo $image_name:$tag echo $image_name:$tag
sudo docker build -t $image_name:$tag -f Dockerfile . sudo docker build -t $image_name:$tag -f Dockerfile .
sudo docker logout registry.gitlab.com sudo docker logout registry.gitlab.com
echo "Login to gitlab registry"
echo "$CI_REGISTRY_PW"
echo "$CI_REGISTRY_USER"
echo "$CI_REGISTRY_PW" | sudo docker login registry.gitlab.com -u "$CI_REGISTRY_USER" --password-stdin echo "$CI_REGISTRY_PW" | sudo docker login registry.gitlab.com -u "$CI_REGISTRY_USER" --password-stdin
sudo docker push $image_name:$tag sudo docker push $image_name:$tag
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment