@leverege/build-tools 2.51.3 → 2.51.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.51.3",
3
+ "version": "2.51.5",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -64,7 +64,7 @@
64
64
  "execa": "^9.4.0",
65
65
  "glob": "^11.0.0",
66
66
  "handlebars": "^4.7.8",
67
- "inquirer": "^11.0.1",
67
+ "inquirer": "^11.0.2",
68
68
  "js-yaml": "^4.1.0",
69
69
  "ms": "^2.1.3",
70
70
  "npm-registry-fetch": "^17.1.0",
@@ -73,7 +73,7 @@
73
73
  "read-pkg": "^9.0.1",
74
74
  "readline-sync": "^1.4.10",
75
75
  "semver": "^7.6.3",
76
- "simple-git": "^3.26.0",
76
+ "simple-git": "^3.27.0",
77
77
  "zx": "^8.1.7"
78
78
  },
79
79
  "devDependencies": {
@@ -213,7 +213,6 @@ try {
213
213
  const hostingPrefix = CHANNEL ? '' : 'hosting:'
214
214
 
215
215
  await $( { ac } )`npm run clean && DOTENV_CONFIG_PATH=${path.join( process.cwd(), '.env.temp' )} DEPLOYMENT_TARGET=${TARGET.siteId} npm run build && firebase use ${TARGET.projectId} && firebase ${deployType} --only ${hostingPrefix}${TARGET.siteId}`
216
- .pipe( process.stdout )
217
216
  } catch ( err ) {
218
217
  console.error( err )
219
218
  }
@@ -130,8 +130,9 @@ const ac = new AbortController()
130
130
 
131
131
  EXIT_EVENTS
132
132
  .forEach( ( event ) => {
133
- process.on( event, () => {
133
+ process.on( event, ( d ) => {
134
134
  if ( !exited ) {
135
+ console.error( d )
135
136
  exited = true
136
137
  fs.removeSync( path.join( process.cwd(), '.env.temp' ) )
137
138
  ac.abort()
@@ -142,7 +143,7 @@ EXIT_EVENTS
142
143
  await fs.writeFile( path.join( process.cwd(), '.env.temp' ), envFileContent )
143
144
 
144
145
  try {
145
- await $( { ac } )`DOTENV_CONFIG_PATH=${path.join( process.cwd(), '.env.temp' )} DEPLOYMENT_TARGET=${TARGET.siteId} npm run serve --colors`.pipe( process.stdout )
146
+ await $( { ac } )`DOTENV_CONFIG_PATH=${path.join( process.cwd(), '.env.temp' )} DEPLOYMENT_TARGET=${TARGET.siteId} npm run serve --colors`
146
147
  } catch ( err ) {
147
148
  console.error( err )
148
149
  }
@@ -1,3 +1,6 @@
1
1
  #!/bin/bash
2
2
 
3
+ # ensures the PG_PASSWORD secret exists and correct
4
+ ensureCnpgSecret PG_PASSWORD $SERVICE-postgres-pw
5
+
3
6
  kubectl apply -f cnpg-db-psql-stack/cluster.yaml $K8S_WHAT
@@ -1,3 +1,6 @@
1
1
  #!/bin/bash
2
- #
2
+
3
+ # ensures the TSDB_PASSWORD secret exists and correct
4
+ ensureCnpgSecret TSDB_PASSWORD $SERVICE-postgres-pw
5
+
3
6
  kubectl apply -f cnpg-db-tsdb-basic/cluster.yaml $K8S_WHAT
@@ -1,3 +1,6 @@
1
1
  #!/bin/bash
2
- #
2
+
3
+ # ensures the TSDB_DENSE_PASSWORD secret exists and correct
4
+ ensureCnpgSecret TSDB_DENSE_PASSWORD $SERVICE-postgres-pw
5
+
3
6
  kubectl apply -f cnpg-db-tsdb-dense/cluster.yaml $K8S_WHAT
package/src/helmup.sh CHANGED
@@ -671,6 +671,23 @@ EOSNAPSC
671
671
  sleep 2 # hold up processing for a moment to allow IAM mods to propagate
672
672
  }
673
673
 
674
+ function ensureCnpgSecret() {
675
+ local mgrSecret=$1
676
+ local k8sSecret=$2
677
+
678
+ service-man --from-helmup --sync-secrets ${mgrSecret}=${k8sSecret}
679
+
680
+ if [ $? -ne 0 ];
681
+ then
682
+ cat<<BAD_SECRETS
683
+ `color r "There appears to be a problem with one, or both of the secrets. Please
684
+ rectify the situation and try again."`
685
+
686
+ BAD_SECRETS
687
+ exit 1
688
+ fi
689
+ }
690
+
674
691
  function installVeleroEnvironment() {
675
692
  # Follows instructions => https://github.com/vmware-tanzu/velero-plugin-for-gcp
676
693
  showInstalling "Velero Backup Management"