Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
zhaoxuanchao
zxc-antd-demo
Commits
dd33e4b1
Commit
dd33e4b1
authored
Aug 06, 2021
by
zhaoxuanchao
Browse files
Update .gitlab-ci.yml
parent
57887d9a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
28 deletions
+14
-28
.gitlab-ci.yml
.gitlab-ci.yml
+14
-28
No files found.
.gitlab-ci.yml
View file @
dd33e4b1
default
:
image
:
node:12
stages
:
-
build
-
test
-
deploy
.
build
_
code
:
build
-
code
-job
:
stage
:
build
script
:
-
ping mirrors.aliyun.com -c
5
-
ping registry.npm.taobao.org -c
5
-
yarn bootstrap
-
yarn run build
artifacts
:
name
:
"
${CI_COMMIT_SHA}_build"
untracked
:
true
paths
:
-
build/
expire_in
:
3 hrs
-
echo "Check the ruby version, then build some Ruby project files:"
-
ruby -v
-
rake
test-code-job1
:
stage
:
test
script
:
-
echo "If the files are built successfully, test some files with one command:"
-
rake test1
.upload_to_server
:
stage
:
deploy
test-code-job2
:
stage
:
test
script
:
# 换源aliyun并安装rsync
-
sed -i "s@deb.debian.org@mirrors.aliyun.com@g" /etc/apt/sources.list
-
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
-
echo "If the files are built successfully, test other files with a different command:"
-
rake test2
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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