Commit 9c78da27 authored by ymir's avatar ymir

install to STG console

parent 0109688a
Pipeline #62261 passed with stages
in 3 minutes and 9 seconds
......@@ -54,10 +54,25 @@ deploy_development:
name: development
only:
- development
#deploy_staging:
# stage: deploy
# script:
# environment:
# name: staging
# only:
# - staging
deploy_staging:
stage: deploy
script:
# edit & send docker file
- sed -i s/"{SSH_USER_PASS}"/${SSH_USER_PASS}/g install.sh
- sed -i s/"{SSH_PORT}"/${SSH_PORT}/g install.sh
- sed -i s/"{SSH_USER_NAME}"/${SSH_USER_NAME}/g install.sh
- sed -i s/"{CI_BUILD_REF_NAME}"/${CI_BUILD_REF_NAME}/g install.sh
- sed -i s/"{ENVIRONMENT}"/STG/g install.sh
# copy install script
- sshpass -e scp -o stricthostkeychecking=no -P ${SSH_PORT} install.sh ${SSH_USER_NAME}@91.121.9.53:/tmp/install.sh
- sshpass -e ssh -o stricthostkeychecking=no -p ${SSH_PORT} ${SSH_USER_NAME}@91.121.9.53 docker cp /tmp/install.sh ymirfrostgiant_stg_console:/tmp/install.sh
# start container & run install
- sshpass -e ssh -o stricthostkeychecking=no -p ${SSH_PORT} ${SSH_USER_NAME}@91.121.9.53 docker start ymirfrostgiant_stg_console
- sshpass -e ssh -o stricthostkeychecking=no -p ${SSH_PORT} ${SSH_USER_NAME}@91.121.9.53 docker exec -t ymirfrostgiant_stg_console bash /tmp/install.sh
# remove install script
- sshpass -e ssh -o stricthostkeychecking=no -p ${SSH_PORT} ${SSH_USER_NAME}@91.121.9.53 docker exec -t ymirfrostgiant_stg_console rm /tmp/install.sh
- sshpass -e ssh -o stricthostkeychecking=no -p ${SSH_PORT} ${SSH_USER_NAME}@91.121.9.53 rm -R /tmp/install.sh
environment:
name: staging
only:
- staging
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