-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
62 lines (58 loc) · 1.3 KB
/
.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
57
58
59
60
61
62
stages:
- test
- build
- publish
unit-test:
image: node:latest
stage: test
script:
- npm install
- npm run test:unit
coverage: '/All files\s+\|\s+\d+\.\d+/'
artifacts:
reports:
junit:
- test-results.xml
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml
lint-test:
image: node:latest
stage: test
script:
- npm install
- npm run lint
build:
image: node:latest
stage: build
script:
- apt-get install python3
- npm install
- ./version_build.sh
- npm run build
artifacts:
expire_in: 1 week
paths:
- dist
- public/conf/build
publish:
image: node:latest
stage: publish
needs: [build]
script:
- git config --global user.email "${GITLAB_USER_EMAIL}"
- git config --global user.name "${GITLAB_USER_NAME}"
- REPO_URL="https://oauth2:[email protected]/lucterios2/lucterios.git"
- REPO_DIR=lucterios
- rm -fr $REPO_DIR
- git clone $REPO_URL $REPO_DIR
- cp public/conf/build $REPO_DIR/client/build_client
- cd $REPO_DIR
- git status
- git remote -vvv
- git add client/build_client
- git status
- git commit -a -m 'GUI change'
- git status
- git push --set-upstream origin master
- git status