@xfe-repo/web-app 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deploy/.drone.yml +33 -31
- package/package.json +1 -1
package/deploy/.drone.yml
CHANGED
|
@@ -38,25 +38,21 @@ steps:
|
|
|
38
38
|
- echo -n "$REACT_APP_RELEASE" > deploy/static/release
|
|
39
39
|
- pnpm build
|
|
40
40
|
|
|
41
|
-
- name:
|
|
42
|
-
image: xhj-prod-registry-vpc.cn-hangzhou.cr.aliyuncs.com/
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- sed -i "s/<<APP_NAME>>/$appName/g" deploy/helm/values.yaml
|
|
57
|
-
- docker build -f deploy/Dockerfile -t xhj-prod-registry-vpc.cn-hangzhou.cr.aliyuncs.com/xhj-image/$$appName:$$CI_COMMIT_SHA . --no-cache
|
|
58
|
-
- docker push xhj-prod-registry-vpc.cn-hangzhou.cr.aliyuncs.com/xhj-image/$$appName:$$CI_COMMIT_SHA
|
|
59
|
-
- docker rmi xhj-prod-registry-vpc.cn-hangzhou.cr.aliyuncs.com/xhj-image/$$appName:$$CI_COMMIT_SHA
|
|
41
|
+
- name: image-build
|
|
42
|
+
image: xhj-prod-registry-vpc.cn-hangzhou.cr.aliyuncs.com/image-common/kaniko:latest
|
|
43
|
+
pull: always
|
|
44
|
+
settings:
|
|
45
|
+
registry: xhj-prod-registry-vpc.cn-hangzhou.cr.aliyuncs.com
|
|
46
|
+
username:
|
|
47
|
+
from_secret: username
|
|
48
|
+
password:
|
|
49
|
+
from_secret: password
|
|
50
|
+
dockerfile: deploy/Dockerfile
|
|
51
|
+
repo_path: xhj-prod-registry-vpc.cn-hangzhou.cr.aliyuncs.com/xhj-image/
|
|
52
|
+
repo_name: ${DRONE_REPO}
|
|
53
|
+
tags:
|
|
54
|
+
- ${CI_COMMIT_SHA}
|
|
55
|
+
- latest
|
|
60
56
|
|
|
61
57
|
- name: pre-deploy
|
|
62
58
|
image: xhj-prod-registry-vpc.cn-hangzhou.cr.aliyuncs.com/xhj-image-common/deploy-helm:latest
|
|
@@ -79,17 +75,17 @@ steps:
|
|
|
79
75
|
- name: deploy-to-test
|
|
80
76
|
image: xhj-prod-registry-vpc.cn-hangzhou.cr.aliyuncs.com/xhj-image-common/deploy-helm:latest
|
|
81
77
|
commands:
|
|
78
|
+
- export KUBECONFIG=$PWD/kube_config
|
|
82
79
|
- cp deploy/helm/values.yaml deploy/helm/values.test.yaml
|
|
83
80
|
- sed -i "s/<<ENV_TYPE>>/test/g" deploy/helm/values.test.yaml
|
|
84
81
|
- sed -i "s/<<APP_SUFFIX>>/-$HOST_PREFIX/g" deploy/helm/values.test.yaml
|
|
85
82
|
- sed -i "s/<<HOST_PREFIX>>/$HOST_PREFIX/g" deploy/helm/values.test.yaml
|
|
86
|
-
-
|
|
83
|
+
- appName="`echo ${DRONE_REPO//\//-}`"
|
|
84
|
+
- chartName="$appName-$HOST_PREFIX"
|
|
85
|
+
- echo "$chartName"
|
|
86
|
+
- sed -i "s/deployment/$chartName/g" deploy/helm/Chart.yaml
|
|
87
87
|
- sed -i "s/1.0.0/0.0.0-$CI_COMMIT_SHA/g" deploy/helm/Chart.yaml
|
|
88
|
-
- helm upgrade --install "$
|
|
89
|
-
-f deploy/helm/values.test.yaml \
|
|
90
|
-
--namespace deployment-test \
|
|
91
|
-
--create-namespace \
|
|
92
|
-
--history-max 5 \
|
|
88
|
+
- helm upgrade --install "$chartName" deploy/helm -f deploy/helm/values.test.yaml --namespace deployment-test --create-namespace --history-max 5
|
|
93
89
|
when:
|
|
94
90
|
event:
|
|
95
91
|
- custom
|
|
@@ -165,13 +161,19 @@ get:
|
|
|
165
161
|
name: config
|
|
166
162
|
---
|
|
167
163
|
kind: secret
|
|
168
|
-
name: ssh-key
|
|
169
|
-
get:
|
|
170
|
-
path: deployer-ssh-key
|
|
171
|
-
name: id_rsa
|
|
172
|
-
---
|
|
173
|
-
kind: secret
|
|
174
164
|
name: docker-key
|
|
175
165
|
get:
|
|
176
166
|
path: docker-key
|
|
177
167
|
name: config
|
|
168
|
+
---
|
|
169
|
+
kind: secret
|
|
170
|
+
name: username
|
|
171
|
+
get:
|
|
172
|
+
path: docker-auth
|
|
173
|
+
name: username
|
|
174
|
+
---
|
|
175
|
+
kind: secret
|
|
176
|
+
name: password
|
|
177
|
+
get:
|
|
178
|
+
path: docker-auth
|
|
179
|
+
name: password
|