-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
107 lines (99 loc) · 2.52 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
include:
- project: iiidevops-templates/ci-template
ref: v2.12.6
file: ci/template.gitlab-ci.yml
stages:
- initial
- scan
- build
- deploy
- test
- userjobs
Copy Code From EE:
stage: initial
variables:
iiidevops: copy-code
PNPM_HOME: "/pnpm"
image:
name: node:18
before_script:
- git config --global user.email "[email protected]"
- git config --global user.name "GitLab CI"
- export PATH="$PNPM_HOME:$PATH"
- corepack enable
- pnpm add -g [email protected]
script:
- git clone -b v3 https://gitlab-ci-token:[email protected]/iiidevops/devopsui-mono.git Mono
- 'cp Mono/dockerfiles/LITE.Dockerfile ./Dockerfile
cp Mono/app/lerna.json ./app/lerna.json
cp Mono/app/apps/lite/package.json ./app/package.json
cp Mono/build/entrypoint.sh ./build/entrypoint.sh
cp Mono/build/default.nginx ./build/default.nginx
cp -r Mono/app/apps/lite ./app/apps
cp -r Mono/app/apps/shared ./app/apps
cp -r Mono/iiidevops ./
'
# - pwd
# - ls -la
# - cd app && pnpm install
# - pwd
# - ls -la
# - cd -
- rm -rf Mono
- "if [ -f common.yaml ]; then\n rm common.yaml\nfi\n"
- git add -A
- git commit -m "Sync from full by bot"
- git push "https://gitlab-ci-token:$PUSH_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git"
HEAD:$CI_DEFAULT_BRANCH
- git push "https://gitlab-ci-token:$PUSH_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git"
--tags
- echo "同步成功,故意拋出錯誤以暫停後續任務執行"
rules:
- if: $CI_PIPELINE_SOURCE == 'trigger'
Test--SonarQube source code scan:
variables:
iiidevops: sonarqube
CHART_TYPE: normal
Test--Semgrep SAST code scan:
variables:
iiidevops: semgrep
SEARCH_MAX_DEPTH: 20
SAST_EXCLUDED_PATHS: spec, test, tests, tmp, iiidevops, **/*.md
Test--Anchore SBOM source code scan:
variables:
iiidevops: anchore-code
Test--Checkmarx source code scan:
variables:
iiidevops: checkmarx
Build image:
variables:
iiidevops: build
Build--Scan docker image:
variables:
iiidevops: build
Deploy--Set environment and wait deployment:
variables:
iiidevops: deploy
Deploy--Web:
variables:
iiidevops: deploy
CHART_WEB_PORT: 80
CHART_PROXY_BODY_SIZE: 1m
Test--Anchore SBOM:
variables:
iiidevops: anchore
Test--ZAP:
variables:
iiidevops: zap
CHART_WEB_PORT: 80
Test--WebInspect:
variables:
iiidevops: webinspect
Test--Postman:
variables:
iiidevops: postman
CHART_WEB_PORT: 80
Test--Sideex:
variables:
iiidevops: sideex
CHART_WEB_PORT: 80