Commit dd33e4b1 authored by zhaoxuanchao's avatar zhaoxuanchao
Browse files

Update .gitlab-ci.yml

parent 57887d9a
default:
image: node:12
stages: stages:
- build - build
- test - test
- deploy
.build_code: build-code-job:
stage: build stage: build
script: script:
- ping mirrors.aliyun.com -c 5 - echo "Check the ruby version, then build some Ruby project files:"
- ping registry.npm.taobao.org -c 5 - ruby -v
- yarn bootstrap - rake
- yarn run build
artifacts: test-code-job1:
name: "${CI_COMMIT_SHA}_build" stage: test
untracked: true script:
paths: - echo "If the files are built successfully, test some files with one command:"
- build/ - rake test1
expire_in: 3 hrs
.upload_to_server: test-code-job2:
stage: deploy stage: test
script: script:
# 换源aliyun并安装rsync - echo "If the files are built successfully, test other files with a different command:"
- sed -i "s@deb.debian.org@mirrors.aliyun.com@g" /etc/apt/sources.list - rake test2
- sed -i "s@security.debian.org@mirrors.aliyun.com@g" /etc/apt/sources.list
- DEBIAN_FRONTEND=noninteractive && apt-get clean && apt-get update --fix-missing && apt-get install -y rsync
# 配置ssh密钥和config
- mkdir -p ~/.ssh
- cp ${FRONTEND_SSH_KEY} ~/.ssh/id_rsa
- chmod 700 ~/.ssh/id_rsa
- cp ${FRONTEND_SSH_CONFIG} ~/.ssh/config
# 开始部署
- yarn run deploy
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