代码拉取完成,页面将自动刷新
stages:
- sync-code
- build
- deploy
sync-code:
stage: sync-code
only:
- master
script:
- export GIT_NAME_DIR=`grep -E "url = .*.git" $PWD/.git/config|awk -F 'qiushaocloud/' '{print $2}' | sed s/\.git//g`
- git config --global user.email "qiushaocloud@126.com"
- git config --global user.name "qiushaocloud"
- export GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no"
- mkdir -p /root/codes && cd /root/codes
#- chmod 600 /root/.ssh/id_rsa
- git clone ssh://git@gitlab.qiushaocloud.top:61023/qiushaocloud/$GIT_NAME_DIR.git
- cd $GIT_NAME_DIR && echo `pwd`
- sh push-remote-git-repos.sh
tags:
- qiushaocloud-runner
build:
stage: build
only:
- master
script:
- docker build -t qiushaocloud/ub1604-nvm-node-base:latest .
tags:
- qiushaocloud-runner
deploy:
stage: deploy
only:
- master
script:
- docker login --username $DOCKER_HUB_USER_NAME --password $DOCKER_HUB_USER_PASSWORD
- docker push qiushaocloud/ub1604-nvm-node-base:latest
tags:
- qiushaocloud-runner
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。