-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
56 lines (51 loc) · 988 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
image: redrock-fe
variables:
REPO_NAME: cqupt-help-bms
stages:
- setup
- build
- deploy
prepare:
stage: setup
tags:
- redrock-fe
cache:
key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
paths:
- node_modules/
script:
- npm ci
only:
changes:
- package-lock.json
build:
stage: build
tags:
- redrock-fe
cache:
key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
paths:
- node_modules/
policy: pull
script:
- npm run build
artifacts:
expire_in: 3 days
paths:
- build
deploy_dev:
stage: deploy
when: manual
tags:
- redrock-fe
script:
- tar -C build -cf dist.tar .
- curl -F [email protected] -X POST http://202.202.43.234/rrapi/deploy/node/$REPO_NAME?stage=$CI_JOB_NAME
deploy_prod:
stage: deploy
when: manual
tags:
- redrock-fe
script:
- tar -C build -cf dist.tar .
- curl -F [email protected] -X POST http://202.202.43.234/rrapi/deploy/node/$REPO_NAME?stage=$CI_JOB_NAME