@leverege/build-tools 2.9.4 → 2.9.6
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/overwhelm.js +9 -0
- package/lib/server/repo-init/config.tgz +0 -0
- package/lib/web/overwhelm.js +9 -0
- package/package.json +2 -3
- package/src/circleate +11 -11
- package/src/helmup +6 -4
- package/src/overwhelm.js +9 -0
- package/src/anchor +0 -41
package/lib/server/overwhelm.js
CHANGED
|
@@ -76,6 +76,15 @@ const context = args.context || gitBranch;
|
|
|
76
76
|
if (context === 'master') {
|
|
77
77
|
console.log('***ERROR: master context is forbidden; change to a different branch\n\n');
|
|
78
78
|
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (!fs.existsSync('overwhelm.yaml')) {
|
|
82
|
+
console.log(chalk.red.bold(`
|
|
83
|
+
|
|
84
|
+
***ERROR overwhelm => missing the overwhelm.yaml file - this command expects
|
|
85
|
+
to execute from within a platform-k8s branch
|
|
86
|
+
`));
|
|
87
|
+
process.exit(1);
|
|
79
88
|
} // Load the default values and then overlay with the project specific yaml
|
|
80
89
|
// values. This supports the notion of this type of approach in the
|
|
81
90
|
// overwhelm yaml settings:
|
|
Binary file
|
package/lib/web/overwhelm.js
CHANGED
|
@@ -76,6 +76,15 @@ const context = args.context || gitBranch;
|
|
|
76
76
|
if (context === 'master') {
|
|
77
77
|
console.log('***ERROR: master context is forbidden; change to a different branch\n\n');
|
|
78
78
|
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (!fs.existsSync('overwhelm.yaml')) {
|
|
82
|
+
console.log(chalk.red.bold(`
|
|
83
|
+
|
|
84
|
+
***ERROR overwhelm => missing the overwhelm.yaml file - this command expects
|
|
85
|
+
to execute from within a platform-k8s branch
|
|
86
|
+
`));
|
|
87
|
+
process.exit(1);
|
|
79
88
|
} // Load the default values and then overlay with the project specific yaml
|
|
80
89
|
// values. This supports the notion of this type of approach in the
|
|
81
90
|
// overwhelm yaml settings:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leverege/build-tools",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.6",
|
|
4
4
|
"description": "A collection of build / support tools for Leverege developers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
21
21
|
},
|
|
22
22
|
"bin": {
|
|
23
|
-
"anchor": "src/anchor",
|
|
24
23
|
"build-tools": "src/build-tools.js",
|
|
25
24
|
"circleate": "src/circleate",
|
|
26
25
|
"decrypt-secrets": "src/decrypt-secrets",
|
|
@@ -81,6 +80,6 @@
|
|
|
81
80
|
"@babel/node": "^7.16.8",
|
|
82
81
|
"@leverege/babel-preset-leverege-node": "^2.0.0",
|
|
83
82
|
"@leverege/eslint-config-leverege": "^3.0.1",
|
|
84
|
-
"npm": "^8.5.
|
|
83
|
+
"npm": "^8.5.3"
|
|
85
84
|
}
|
|
86
85
|
}
|
package/src/circleate
CHANGED
|
@@ -53,7 +53,7 @@ executors:
|
|
|
53
53
|
jobs:
|
|
54
54
|
install:
|
|
55
55
|
docker:
|
|
56
|
-
- image: circleci/node:
|
|
56
|
+
- image: circleci/node:gallium
|
|
57
57
|
steps:
|
|
58
58
|
- checkout
|
|
59
59
|
- restore_cache:
|
|
@@ -79,7 +79,7 @@ jobs:
|
|
|
79
79
|
|
|
80
80
|
security-check:
|
|
81
81
|
docker:
|
|
82
|
-
- image: circleci/node:
|
|
82
|
+
- image: circleci/node:gallium
|
|
83
83
|
steps:
|
|
84
84
|
- checkout
|
|
85
85
|
- attach_workspace:
|
|
@@ -90,7 +90,7 @@ jobs:
|
|
|
90
90
|
|
|
91
91
|
license-check:
|
|
92
92
|
docker:
|
|
93
|
-
- image: circleci/node:
|
|
93
|
+
- image: circleci/node:gallium
|
|
94
94
|
steps:
|
|
95
95
|
- checkout
|
|
96
96
|
- attach_workspace:
|
|
@@ -105,7 +105,7 @@ jobs:
|
|
|
105
105
|
|
|
106
106
|
lint:
|
|
107
107
|
docker:
|
|
108
|
-
- image: circleci/node:
|
|
108
|
+
- image: circleci/node:gallium
|
|
109
109
|
steps:
|
|
110
110
|
- checkout
|
|
111
111
|
- attach_workspace:
|
|
@@ -119,7 +119,7 @@ jobs:
|
|
|
119
119
|
|
|
120
120
|
docs:
|
|
121
121
|
docker:
|
|
122
|
-
- image: circleci/node:
|
|
122
|
+
- image: circleci/node:gallium
|
|
123
123
|
steps:
|
|
124
124
|
- checkout
|
|
125
125
|
- attach_workspace:
|
|
@@ -136,7 +136,7 @@ jobs:
|
|
|
136
136
|
environment:
|
|
137
137
|
TZ: 'America/New_York'
|
|
138
138
|
docker:
|
|
139
|
-
- image: circleci/node:
|
|
139
|
+
- image: circleci/node:gallium
|
|
140
140
|
# IF YOU NEED ANY OF THESE, UNCOMMENT TO USE
|
|
141
141
|
# - image: redis
|
|
142
142
|
# - image: circleci/mysql:5.7
|
|
@@ -172,7 +172,7 @@ jobs:
|
|
|
172
172
|
|
|
173
173
|
- run:
|
|
174
174
|
name: Check if coverage meets at least 70%
|
|
175
|
-
command:
|
|
175
|
+
command: npx c8 check-coverage --functions 70 --lines 70 --statements 70
|
|
176
176
|
|
|
177
177
|
- store_artifacts:
|
|
178
178
|
path: coverage
|
|
@@ -181,7 +181,7 @@ jobs:
|
|
|
181
181
|
build:
|
|
182
182
|
# build should make dist image and prepare docker file
|
|
183
183
|
docker:
|
|
184
|
-
- image: circleci/node:
|
|
184
|
+
- image: circleci/node:gallium
|
|
185
185
|
|
|
186
186
|
steps:
|
|
187
187
|
- checkout
|
|
@@ -476,7 +476,7 @@ jobs:
|
|
|
476
476
|
|
|
477
477
|
build:
|
|
478
478
|
docker:
|
|
479
|
-
- image: circleci/node:
|
|
479
|
+
- image: circleci/node:gallium
|
|
480
480
|
steps:
|
|
481
481
|
- checkout
|
|
482
482
|
- restore_cache:
|
|
@@ -510,7 +510,7 @@ jobs:
|
|
|
510
510
|
|
|
511
511
|
deploy-dev:
|
|
512
512
|
docker:
|
|
513
|
-
- image: circleci/node:
|
|
513
|
+
- image: circleci/node:gallium
|
|
514
514
|
steps:
|
|
515
515
|
- attach_workspace:
|
|
516
516
|
at: ~/project
|
|
@@ -521,7 +521,7 @@ jobs:
|
|
|
521
521
|
|
|
522
522
|
deploy-prod:
|
|
523
523
|
docker:
|
|
524
|
-
- image: circleci/node:
|
|
524
|
+
- image: circleci/node:gallium
|
|
525
525
|
steps:
|
|
526
526
|
- attach_workspace:
|
|
527
527
|
at: ~/project
|
package/src/helmup
CHANGED
|
@@ -516,6 +516,8 @@ PLUGIN_NOEXEC
|
|
|
516
516
|
|
|
517
517
|
function getServiceAndChartVersion() {
|
|
518
518
|
|
|
519
|
+
SERVICE=
|
|
520
|
+
CHARTVER=
|
|
519
521
|
# Allows chart version from command line via <deployment>/<x.y.z>
|
|
520
522
|
IFS="/" read SERVICE CHARTVER <<< "$1"
|
|
521
523
|
|
|
@@ -529,7 +531,7 @@ function getServiceAndChartVersion() {
|
|
|
529
531
|
CHARTVER=${LCL_CHART#*/Chart-}
|
|
530
532
|
cat<<DEPRECATED_CHART
|
|
531
533
|
$YELO_WARN The use of $SERVICE/$LCL_CHART to lock the chart version has
|
|
532
|
-
been deprecated. Create a top level `color g "
|
|
534
|
+
been deprecated. Create a top level `color g "Versions.json"` file instead:
|
|
533
535
|
|
|
534
536
|
{
|
|
535
537
|
"scheduler" : "3.6.1",
|
|
@@ -544,7 +546,7 @@ DEPRECATED_CHART
|
|
|
544
546
|
local VERSIONS="./Versions.json"
|
|
545
547
|
if [ -f "$VERSIONS" ];
|
|
546
548
|
then
|
|
547
|
-
CHARTVER=`node -e "charts=require('$VERSIONS');console.log( charts['$SERVICE']
|
|
549
|
+
CHARTVER=`node -e "charts=require('$VERSIONS');console.log( charts['$SERVICE']?.chart || '' )"`
|
|
548
550
|
fi
|
|
549
551
|
}
|
|
550
552
|
|
|
@@ -642,8 +644,8 @@ function doInstall() {
|
|
|
642
644
|
|
|
643
645
|
transponder-*)
|
|
644
646
|
# transponders use the same chart but different deployment name
|
|
645
|
-
helm upgrade --install $SERVICE leverege/transponder
|
|
646
|
-
|
|
647
|
+
HELMUP="helm upgrade --install $SERVICE leverege/transponder --values $SERVICE/values.yaml $CHARTVER $WHAT"
|
|
648
|
+
printf "Helming => `color g \"$HELMUP\"`\n\n" && $HELMUP
|
|
647
649
|
;;
|
|
648
650
|
|
|
649
651
|
"traefik")
|
package/src/overwhelm.js
CHANGED
|
@@ -39,6 +39,15 @@ if ( context === 'master' ) {
|
|
|
39
39
|
process.exit( 1 )
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
if ( !fs.existsSync( 'overwhelm.yaml' ) ) {
|
|
43
|
+
console.log( chalk.red.bold( `
|
|
44
|
+
|
|
45
|
+
***ERROR overwhelm => missing the overwhelm.yaml file - this command expects
|
|
46
|
+
to execute from within a platform-k8s branch
|
|
47
|
+
` ) )
|
|
48
|
+
process.exit( 1 )
|
|
49
|
+
}
|
|
50
|
+
|
|
42
51
|
// Load the default values and then overlay with the project specific yaml
|
|
43
52
|
// values. This supports the notion of this type of approach in the
|
|
44
53
|
// overwhelm yaml settings:
|
package/src/anchor
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Load the standard helper functions
|
|
4
|
-
. `build-tools --bashfun`
|
|
5
|
-
|
|
6
|
-
if [ -z "$1" ] || [ -z "$2" ];
|
|
7
|
-
then
|
|
8
|
-
cat<<USAGE
|
|
9
|
-
|
|
10
|
-
$(color g "Usage: anchor <service name> <chart version>\n")
|
|
11
|
-
|
|
12
|
-
USAGE
|
|
13
|
-
exit 1
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
SERVICE=$1
|
|
17
|
-
VERSION=$2
|
|
18
|
-
ANCHOR="${SERVICE}/Chart-${VERSION}"
|
|
19
|
-
|
|
20
|
-
if compgen -G "${SERVICE}/Chart-*" > /dev/null ;
|
|
21
|
-
then
|
|
22
|
-
cat<<ALREADY_ANCHORED
|
|
23
|
-
|
|
24
|
-
$(color r "$SERVICE is already anchored")
|
|
25
|
-
$(color y "Go remove the existing anchor from ${SERVICE} and try again")
|
|
26
|
-
|
|
27
|
-
`/bin/ls ${SERVICE}/Chart*`
|
|
28
|
-
|
|
29
|
-
ALREADY_ANCHORED
|
|
30
|
-
exit 1
|
|
31
|
-
fi
|
|
32
|
-
|
|
33
|
-
printf "Locking $SERVICE chart version at $VERSION\n"
|
|
34
|
-
touch ${ANCHOR}
|
|
35
|
-
|
|
36
|
-
if [ -f "${ANCHOR}" ];
|
|
37
|
-
then
|
|
38
|
-
printf "Service locked with creation of ${ANCHOR}\n"
|
|
39
|
-
else
|
|
40
|
-
printf "***ERROR: failed to create anchor ${ANCHOR}\n"
|
|
41
|
-
fi
|