@leverege/build-tools 2.5.30 → 2.5.32

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.
@@ -144,6 +144,6 @@ if (args.help) {
144
144
 
145
145
 
146
146
  if (args._unknown) {
147
- console.log(`Hey Bozo, WTF am I supposed to do with ${args._unknown}?`);
147
+ console.log(`\nUnrecognized argument [${args._unknown}] try --help\n`);
148
148
  process.exit(1);
149
149
  }
Binary file
@@ -144,6 +144,6 @@ if (args.help) {
144
144
 
145
145
 
146
146
  if (args._unknown) {
147
- console.log(`Hey Bozo, WTF am I supposed to do with ${args._unknown}?`);
147
+ console.log(`\nUnrecognized argument [${args._unknown}] try --help\n`);
148
148
  process.exit(1);
149
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.5.30",
3
+ "version": "2.5.32",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -63,21 +63,21 @@
63
63
  "inquirer": "^7.3.3",
64
64
  "js-yaml": "^4.0.0",
65
65
  "ncp": "^2.0.0",
66
- "npm-check-updates": "^11.1.4",
66
+ "npm-check-updates": "^11.1.9",
67
67
  "npm-registry-fetch": "^9.0.0",
68
68
  "open": "^7.4.2",
69
69
  "ora": "^5.3.0",
70
70
  "parse-gitignore": "^1.0.1",
71
71
  "readline-sync": "^1.4.10",
72
72
  "semver": "^7.3.4",
73
- "simple-git": "^2.35.1"
73
+ "simple-git": "^2.35.2"
74
74
  },
75
75
  "devDependencies": {
76
- "@babel/cli": "^7.12.17",
77
- "@babel/core": "^7.12.17",
78
- "@babel/node": "^7.12.17",
76
+ "@babel/cli": "^7.13.0",
77
+ "@babel/core": "^7.13.1",
78
+ "@babel/node": "^7.13.0",
79
79
  "@leverege/babel-preset-leverege-node": "^1.1.1",
80
80
  "@leverege/eslint-config-leverege": "^2.2.0",
81
- "npm": "^7.5.4"
81
+ "npm": "^7.5.6"
82
82
  }
83
83
  }
package/src/bash-funcs CHANGED
@@ -44,7 +44,7 @@ ERREXIT
44
44
  }
45
45
 
46
46
  function exitOnError() {
47
- [ $1 -ne 0 ] && errorExit $2
47
+ [ $1 -ne 0 ] && errorExit "$2"
48
48
  }
49
49
 
50
50
  function yesOrSkipToContinue() {
@@ -138,6 +138,6 @@ if ( args.help ) {
138
138
 
139
139
  /* eslint-disable no-underscore-dangle */
140
140
  if ( args._unknown ) {
141
- console.log( `Hey Bozo, WTF am I supposed to do with ${args._unknown}?` )
141
+ console.log( `\nUnrecognized argument [${args._unknown}] try --help\n` )
142
142
  process.exit( 1 )
143
143
  }
package/src/helmup CHANGED
@@ -221,7 +221,13 @@ function checkSSDStorageClass(){
221
221
  function getManagedSecret() {
222
222
  local SECNAME=$1
223
223
  local PROJECT="${2:-leverege-docker-images}"
224
- SECRET=$(gcloud secrets versions access latest --secret=$SECNAME --project=$PROJECT)
224
+ SECRET=$(gcloud secrets versions access latest --secret="$SECNAME" --project=$PROJECT)
225
+ if [ $? -ne 0 ];
226
+ then
227
+ printf "This failed=>[gcloud secrets versions access latest --secret="$SECNAME" --project=$PROJECT]\n"
228
+ printf "Returned =>[$SECRET]\n\n"
229
+ exit 1
230
+ fi
225
231
  echo $SECRET
226
232
  }
227
233
 
@@ -231,14 +237,18 @@ function installTraefik() {
231
237
  kubectl get secret cloudflare --namespace traefik &>/dev/null
232
238
  if [[ $? -eq 1 ]]; then
233
239
  cat<<NEED_TRAEFIK_SECRET
234
- `color r "***ERROR:"` missing secret: `color y cloudflare` namespace: `color y traefik`
240
+ $RED_ERROR missing secret: `color y cloudflare` namespace: `color y traefik`
235
241
 
236
242
  This secret may be fetched from the leverege-docker-images cluster and
237
243
  properly injected into this cluster.
238
244
  NEED_TRAEFIK_SECRET
239
245
  yesToContinue "to copy and inject the cloudflare secret"
240
246
  TOKEN=$(getManagedSecret "CLOUDFLARE_API_TOKEN")
241
- exitOnError $? "Failed to fetch the secret from leverege-docker-images"
247
+ if [ $? -ne 0 ];
248
+ then
249
+ printf "$RED_ERROR getManagedSecret reponse=>[$TOKEN]"
250
+ exitOnError 1 "Failed to fetch the secret from leverege-docker-images"
251
+ fi
242
252
  printf "\nInjecting=[$TOKEN] into cloudflare secret\n"
243
253
  kubectl create secret generic cloudflare \
244
254
  --namespace traefik \
@@ -331,8 +341,7 @@ function installVelero() {
331
341
  --set schedules.mysql.template.snapshotVolumes="true"
332
342
 
333
343
  ## Instruct users to move velero keys
334
- printf "\n$YELO_WARN MOVE THE SERVICE ACCOUNT TO YOUR KEYS FOLDER"
335
- printf "\n$YELO_WARN NO REALLY...MOVE credentials-velero file NOW"
344
+ printf "\n$YELO_WARN Use the velero-credentials secret for accessing velero\n"
336
345
  }
337
346
 
338
347
  # ---------- helmup MAIN ----------
@@ -441,9 +450,13 @@ function doInstall() {
441
450
  ;;
442
451
 
443
452
  "elastic"|"elasticsearch")
453
+ LOCAL_ES_VALUES="elasticsearch/es-values.yaml"
454
+ [ ! -f "$LOCAL_ES_VALUES" ] && exitOnError 1 "Missing the local ES config file => `color y $LOCAL_ES_VALUES`"
444
455
  checkSSDStorageClass
445
- helm repo add elastic https://helm.elastic.co
446
- helm upgrade --install elasticsearch elastic/elasticsearch --set volumeClaimTemplate.storageClassName="ssd"
456
+ helm repo add elastic https://helm.elastic.co && helm repo update
457
+ helm upgrade --install elasticsearch elastic/elasticsearch \
458
+ --values $LOCAL_ES_VALUES \
459
+ --set volumeClaimTemplate.storageClassName="ssd"
447
460
  ;;
448
461
 
449
462
  "monitoring")