@leverege/build-tools 2.0.3 → 2.0.4
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/lib/server/circleate +17 -9
- package/lib/server/helmup +0 -4
- package/package.json +1 -1
- package/src/circleate +17 -9
- package/src/helmup +0 -4
package/lib/server/circleate
CHANGED
|
@@ -44,7 +44,7 @@ create_server_config(){
|
|
|
44
44
|
cat<<EOCIRCLE > config.yml
|
|
45
45
|
version: 2.1
|
|
46
46
|
orbs:
|
|
47
|
-
gcp-gcr: circleci/gcp-gcr@0.
|
|
47
|
+
gcp-gcr: circleci/gcp-gcr@0.6.1
|
|
48
48
|
anchore: anchore/anchore-engine@1.2.0
|
|
49
49
|
executors:
|
|
50
50
|
default:
|
|
@@ -80,6 +80,8 @@ jobs:
|
|
|
80
80
|
timeout: '500'
|
|
81
81
|
policy_failure: true
|
|
82
82
|
- anchore/parse_reports
|
|
83
|
+
- store_artifacts:
|
|
84
|
+
path: anchore-report
|
|
83
85
|
|
|
84
86
|
gcr:
|
|
85
87
|
# gcr build docker image and pushes to gcr
|
|
@@ -90,14 +92,20 @@ jobs:
|
|
|
90
92
|
- run: |
|
|
91
93
|
echo "export CONTAINER_NAME=\$(cat ~/project/container_name)" >> \$BASH_ENV
|
|
92
94
|
echo "export PACKAGE_VERSION=\$(cat ~/project/package_version)" >> \$BASH_ENV
|
|
93
|
-
|
|
94
|
-
- gcp-gcr/build-image
|
|
95
|
+
echo "export NODE_IMAGE=\$(cat ~/project/node_img)" >> \$BASH_ENV
|
|
96
|
+
- gcp-gcr/build-and-push-image
|
|
97
|
+
- gcp-gcr/build-and-push-image
|
|
95
98
|
image: \$CONTAINER_NAME
|
|
96
99
|
tag: \$PACKAGE_VERSION
|
|
97
|
-
path
|
|
98
|
-
- gcp-gcr/
|
|
100
|
+
path: docker
|
|
101
|
+
- gcp-gcr/add-image-tag:
|
|
99
102
|
image: \$CONTAINER_NAME
|
|
100
|
-
tag: \$PACKAGE_VERSION
|
|
103
|
+
source-tag: \$PACKAGE_VERSION
|
|
104
|
+
target-tag: latest
|
|
105
|
+
- gcp-gcr/add-image-tag:
|
|
106
|
+
image: \$CONTAINER_NAME
|
|
107
|
+
source-tag: \$PACKAGE_VERSION
|
|
108
|
+
target-tag: circle-\$NODE_IMAGE-\$CIRCLE_USERNAME
|
|
101
109
|
|
|
102
110
|
smoke-test:
|
|
103
111
|
# smoke test checks for license, security, and linting
|
|
@@ -228,10 +236,12 @@ jobs:
|
|
|
228
236
|
then
|
|
229
237
|
container=\$CIRCLE_PROJECT_REPONAME
|
|
230
238
|
fi
|
|
239
|
+
NODE_IMAGE="\`node -p \"require('./package.json').leverege.nodeimg\"\`"
|
|
231
240
|
|
|
232
241
|
echo v\${PACKAGE_VERSION} > package_version
|
|
233
242
|
echo "export PACKAGE_VERSION=v\${PACKAGE_VERSION}" >> \$BASH_ENV
|
|
234
243
|
echo \${container} > container_name
|
|
244
|
+
echo \${NODE_IMAGE} > node_img
|
|
235
245
|
- run:
|
|
236
246
|
name: Create Dockerfile and build dist directory
|
|
237
247
|
command: npm run dockerize \$PACKAGE_VERSION
|
|
@@ -243,6 +253,7 @@ jobs:
|
|
|
243
253
|
- docker/*
|
|
244
254
|
- package_version
|
|
245
255
|
- container_name
|
|
256
|
+
- node_img
|
|
246
257
|
- package*json
|
|
247
258
|
|
|
248
259
|
workflows:
|
|
@@ -557,6 +568,3 @@ EOCIRCLE
|
|
|
557
568
|
|
|
558
569
|
check_circle_config
|
|
559
570
|
create_circle_config
|
|
560
|
-
|
|
561
|
-
## TODO: tag docker image with
|
|
562
|
-
## CIRCLE_USERNAME
|
package/lib/server/helmup
CHANGED
|
@@ -150,10 +150,6 @@ function installVelero() {
|
|
|
150
150
|
--set schedules.timescale.template.ttl="720h" \
|
|
151
151
|
--set schedules.timescale.template.labelSelector.matchLabels.app="postgresql" \
|
|
152
152
|
--set schedules.timescale.template.snapshotVolumes="true" \
|
|
153
|
-
--set schedules.mysql.schedule="0 2 * * *" \
|
|
154
|
-
--set schedules.mysql.template.ttl="720h" \
|
|
155
|
-
--set schedules.mysql.template.labelSelector.matchLabels.app="mysql" \
|
|
156
|
-
--set schedules.mysql.template.snapshotVolumes="true"
|
|
157
153
|
|
|
158
154
|
## Instruct users to move velero keys
|
|
159
155
|
printf "\n$YELO_WARN MOVE THE SERVICE ACCOUNT TO YOUR KEYS FOLDER"
|
package/package.json
CHANGED
package/src/circleate
CHANGED
|
@@ -44,7 +44,7 @@ create_server_config(){
|
|
|
44
44
|
cat<<EOCIRCLE > config.yml
|
|
45
45
|
version: 2.1
|
|
46
46
|
orbs:
|
|
47
|
-
gcp-gcr: circleci/gcp-gcr@0.
|
|
47
|
+
gcp-gcr: circleci/gcp-gcr@0.6.1
|
|
48
48
|
anchore: anchore/anchore-engine@1.2.0
|
|
49
49
|
executors:
|
|
50
50
|
default:
|
|
@@ -80,6 +80,8 @@ jobs:
|
|
|
80
80
|
timeout: '500'
|
|
81
81
|
policy_failure: true
|
|
82
82
|
- anchore/parse_reports
|
|
83
|
+
- store_artifacts:
|
|
84
|
+
path: anchore-report
|
|
83
85
|
|
|
84
86
|
gcr:
|
|
85
87
|
# gcr build docker image and pushes to gcr
|
|
@@ -90,14 +92,20 @@ jobs:
|
|
|
90
92
|
- run: |
|
|
91
93
|
echo "export CONTAINER_NAME=\$(cat ~/project/container_name)" >> \$BASH_ENV
|
|
92
94
|
echo "export PACKAGE_VERSION=\$(cat ~/project/package_version)" >> \$BASH_ENV
|
|
93
|
-
|
|
94
|
-
- gcp-gcr/build-image
|
|
95
|
+
echo "export NODE_IMAGE=\$(cat ~/project/node_img)" >> \$BASH_ENV
|
|
96
|
+
- gcp-gcr/build-and-push-image
|
|
97
|
+
- gcp-gcr/build-and-push-image
|
|
95
98
|
image: \$CONTAINER_NAME
|
|
96
99
|
tag: \$PACKAGE_VERSION
|
|
97
|
-
path
|
|
98
|
-
- gcp-gcr/
|
|
100
|
+
path: docker
|
|
101
|
+
- gcp-gcr/add-image-tag:
|
|
99
102
|
image: \$CONTAINER_NAME
|
|
100
|
-
tag: \$PACKAGE_VERSION
|
|
103
|
+
source-tag: \$PACKAGE_VERSION
|
|
104
|
+
target-tag: latest
|
|
105
|
+
- gcp-gcr/add-image-tag:
|
|
106
|
+
image: \$CONTAINER_NAME
|
|
107
|
+
source-tag: \$PACKAGE_VERSION
|
|
108
|
+
target-tag: circle-\$NODE_IMAGE-\$CIRCLE_USERNAME
|
|
101
109
|
|
|
102
110
|
smoke-test:
|
|
103
111
|
# smoke test checks for license, security, and linting
|
|
@@ -228,10 +236,12 @@ jobs:
|
|
|
228
236
|
then
|
|
229
237
|
container=\$CIRCLE_PROJECT_REPONAME
|
|
230
238
|
fi
|
|
239
|
+
NODE_IMAGE="\`node -p \"require('./package.json').leverege.nodeimg\"\`"
|
|
231
240
|
|
|
232
241
|
echo v\${PACKAGE_VERSION} > package_version
|
|
233
242
|
echo "export PACKAGE_VERSION=v\${PACKAGE_VERSION}" >> \$BASH_ENV
|
|
234
243
|
echo \${container} > container_name
|
|
244
|
+
echo \${NODE_IMAGE} > node_img
|
|
235
245
|
- run:
|
|
236
246
|
name: Create Dockerfile and build dist directory
|
|
237
247
|
command: npm run dockerize \$PACKAGE_VERSION
|
|
@@ -243,6 +253,7 @@ jobs:
|
|
|
243
253
|
- docker/*
|
|
244
254
|
- package_version
|
|
245
255
|
- container_name
|
|
256
|
+
- node_img
|
|
246
257
|
- package*json
|
|
247
258
|
|
|
248
259
|
workflows:
|
|
@@ -557,6 +568,3 @@ EOCIRCLE
|
|
|
557
568
|
|
|
558
569
|
check_circle_config
|
|
559
570
|
create_circle_config
|
|
560
|
-
|
|
561
|
-
## TODO: tag docker image with
|
|
562
|
-
## CIRCLE_USERNAME
|
package/src/helmup
CHANGED
|
@@ -150,10 +150,6 @@ function installVelero() {
|
|
|
150
150
|
--set schedules.timescale.template.ttl="720h" \
|
|
151
151
|
--set schedules.timescale.template.labelSelector.matchLabels.app="postgresql" \
|
|
152
152
|
--set schedules.timescale.template.snapshotVolumes="true" \
|
|
153
|
-
--set schedules.mysql.schedule="0 2 * * *" \
|
|
154
|
-
--set schedules.mysql.template.ttl="720h" \
|
|
155
|
-
--set schedules.mysql.template.labelSelector.matchLabels.app="mysql" \
|
|
156
|
-
--set schedules.mysql.template.snapshotVolumes="true"
|
|
157
153
|
|
|
158
154
|
## Instruct users to move velero keys
|
|
159
155
|
printf "\n$YELO_WARN MOVE THE SERVICE ACCOUNT TO YOUR KEYS FOLDER"
|