@leverege/build-tools 2.52.0 → 2.52.1

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.52.0",
3
+ "version": "2.52.1",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -64,17 +64,17 @@
64
64
  "execa": "^9.4.0",
65
65
  "glob": "^11.0.0",
66
66
  "handlebars": "^4.7.8",
67
- "inquirer": "^11.0.2",
67
+ "inquirer": "^11.1.0",
68
68
  "js-yaml": "^4.1.0",
69
69
  "ms": "^2.1.3",
70
- "npm-registry-fetch": "^17.1.0",
70
+ "npm-registry-fetch": "^18.0.0",
71
71
  "package-up": "^5.0.0",
72
72
  "parse-gitignore": "^2.0.0",
73
73
  "read-pkg": "^9.0.1",
74
74
  "readline-sync": "^1.4.10",
75
75
  "semver": "^7.6.3",
76
76
  "simple-git": "^3.27.0",
77
- "zx": "^8.1.7"
77
+ "zx": "^8.1.8"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@leverege/eslint-config-leverege": "^4.2.0",
@@ -0,0 +1,20 @@
1
+ registry:
2
+ - root: us-docker.pkg.dev
3
+ - repositories:
4
+ - name: stack
5
+ charts:
6
+ - api-server
7
+ - authz-server
8
+ - emailer
9
+ - message-processor
10
+ - name: leverege
11
+ charts:
12
+ - pubsub-pulse
13
+ - pusher
14
+ - overdose
15
+ - name: cox-health
16
+ charts:
17
+ - actions-server
18
+ - analytics-server
19
+ - centrak-healthz
20
+ - centrak-ingestor
package/src/Docker.mjs CHANGED
@@ -301,8 +301,8 @@ const buildContainerImage = async ( {
301
301
  log( chalk.green.bold( `
302
302
  *** Submitting Build as ${builderName} ***
303
303
  ${gcloudBuild} \\
304
- ${gcloudLogs} \\
305
- ${gcloudTags}
304
+ ${gcloudLogs} \\
305
+ ${gcloudTags}
306
306
  ` ) )
307
307
 
308
308
 
package/src/bash-funcs CHANGED
@@ -34,7 +34,7 @@ function clearScreen() {
34
34
  }
35
35
 
36
36
  function clearlyWarn() {
37
- clearScreen
37
+ [ "$1" != "DO_NOT_CLEAR" ] && clearScreen
38
38
  cat<<CLEARWARN
39
39
 
40
40
  `color y '*** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING ***'`
@@ -0,0 +1,96 @@
1
+ #!/usr/bin/env node
2
+ /*
3
+ * chart-to-registry will...
4
+ */
5
+ import fs from 'node:fs'
6
+
7
+ import chalk from 'chalk'
8
+ import commandLineArgs from 'command-line-args'
9
+ import commandLineUsage from 'command-line-usage'
10
+ import { lt as semverLt } from 'semver'
11
+ import YAML from 'js-yaml'
12
+
13
+ import {
14
+ condir,
15
+ debug,
16
+ errorExit,
17
+ log,
18
+ warning,
19
+ getGitRootDirectory,
20
+ parsePackageJson,
21
+ parseHelmChart,
22
+ shellCmd } from './Utils.mjs'
23
+
24
+ const commandLineOptions = [ // Use commandLineOptions to tie into the Usage statements
25
+ /* eslint-disable max-len */
26
+ {
27
+ name : 'location',
28
+ type : String,
29
+ description : '{green the location of the artifact registry the chart will be pushed to (default us-docker.pkg.dev)}',
30
+ },
31
+ {
32
+ name : 'project',
33
+ type : String,
34
+ description : '{green the name of the google project containing the npmrc and slack config secrets (default leverege-registry)}',
35
+ },
36
+ {
37
+ name : 'repository',
38
+ type : String,
39
+ description : '{green the target repository to receive the pushed chart}',
40
+ },
41
+ {
42
+ name : 'dry-run',
43
+ type : Boolean,
44
+ description : '{yellow perform everything except the actual chart push}',
45
+ },
46
+ {
47
+ name : 'help',
48
+ type : Boolean,
49
+ description : '{green display this help screen}',
50
+ },
51
+ /* eslint-enable max-len */
52
+ ]
53
+
54
+ const sections = [
55
+ {
56
+ header : 'Leverege Helm Chart Compass (for helmup)',
57
+ content : `{green This tool helps helmup navigate the helm charts stored in the
58
+ artifact-registries.}`
59
+ },
60
+ { header : 'Options',
61
+ optionList : commandLineOptions,
62
+ },
63
+ ]
64
+
65
+ const args = commandLineArgs( commandLineOptions, { camelCase : true, partial : true } )
66
+ const usage = commandLineUsage( sections )
67
+
68
+ if ( args.help ) {
69
+ log( usage )
70
+ process.exit( 0 )
71
+ }
72
+
73
+ /* eslint-disable no-underscore-dangle */
74
+ if ( args._unknown ) {
75
+ log( usage )
76
+ log( `\nUnrecognized argument [${chalk.bold.red( args._unknown )}]\n` )
77
+ process.exit( 1 )
78
+ }
79
+ /* eslint-enable no-underscore-dangle */
80
+
81
+ const minNodejsVersion = '18.0.0'
82
+ if ( semverLt( process.version, minNodejsVersion ) ) {
83
+ errorExit( `\n***ERROR: must be running at least node ${minNodejsVersion}\n` )
84
+ }
85
+
86
+ // First of all, fail if we are not in a git repository
87
+ let gitRoot
88
+ try {
89
+ gitRoot = await getGitRootDirectory()
90
+ } catch ( error ) {
91
+ errorExit( chalk.red.bold( error ), { errorCode : 5 } )
92
+ }
93
+
94
+ const chartCompass = YAML.load( fs.readFileSync( './registry-compass.yaml', 'utf8' ) )
95
+
96
+ condir( { chartCompass }, '<==Navigation' )
@@ -9,4 +9,19 @@ OPERATOR_SHUTDOWN
9
9
 
10
10
  yesToContinue "to delete the CNPG Operator"
11
11
 
12
- helm uninstall --namespace cnpg-system cnpg # cnpg-cloudnative-pg
12
+ OPVER="1.24.0"
13
+
14
+ clearlyWarn DO_NOT_CLEAR
15
+
16
+ cat<<IF_YOURE_SURE
17
+
18
+ `color r "To delete the cnpg-operator execute the following command:"`
19
+
20
+ kubectl delete -f \\
21
+ https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-${OPVER%.*}/releases/cnpg-${OPVER}.yaml $K8S_WHAT
22
+
23
+ `color r "***DANGERZONE! running ^^that command will nuke all CNPG dbs and backups!"`
24
+
25
+ IF_YOURE_SURE
26
+
27
+ exit 0
package/src/helmup.sh CHANGED
@@ -924,6 +924,12 @@ CATBACKUP
924
924
  bootstrapLocalSetup $SERVICE
925
925
  ;;
926
926
 
927
+ # XXX temp hack for testing
928
+ "db-timescale-plain")
929
+ initializeCnpgOperand $SERVICE
930
+ bootstrapLocalSetup $SERVICE
931
+ ;;
932
+
927
933
  cnpg-db-*)
928
934
  if [ ! -d $SERVICE ];
929
935
  then