@leverege/build-tools 2.43.4 → 2.43.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.43.4",
3
+ "version": "2.43.6",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -72,6 +72,6 @@
72
72
  },
73
73
  "devDependencies": {
74
74
  "@leverege/eslint-config-leverege": "^4.2.0",
75
- "npm": "^10.2.0"
75
+ "npm": "^10.2.1"
76
76
  }
77
77
  }
@@ -6,10 +6,9 @@
6
6
  import chalk from 'chalk'
7
7
  import commandLineArgs from 'command-line-args'
8
8
  import commandLineUsage from 'command-line-usage'
9
- import ms from 'ms'
10
9
  import { lt as semverLt } from 'semver'
11
10
 
12
- import { debug, log, shellCmd } from './Utils.mjs'
11
+ import { debug, err, log, shellCmd } from './Utils.mjs'
13
12
 
14
13
  const commandLineOptions = [ // Use commandLineOptions to tie into the Usage statements
15
14
  /* eslint-disable max-len */
@@ -57,8 +56,9 @@ if ( args._unknown ) {
57
56
 
58
57
  const gcpProject = args.project ? args.project : process.env.HELM_CHART_REGISTRY || 'leverege-registry'
59
58
 
60
- if ( semverLt( process.version, '18.0.0' ) ) {
61
- log( chalk.red( '\n\n***ERROR: must be running at least node 18\n' ) )
59
+ const minNodejsVersion = '18.13.0'
60
+ if ( semverLt( process.version, minNodejsVersion ) ) {
61
+ log( chalk.red( `\n\n***ERROR: must be running at least node ${minNodejsVersion}\n` ) )
62
62
  process.exit( 1 )
63
63
  }
64
64
 
@@ -67,3 +67,19 @@ const getGcpSecretCommand = ( secretName ) => {
67
67
  }
68
68
 
69
69
  log( chalk.yellow( '\n\n***WARNING: Under Construction' ) )
70
+
71
+ // gcloud auth print-access-token | helm registry login -u oauth2accesstoken \
72
+ // -p ${password} https://us-docker.pkg.dev
73
+ //
74
+ // Get the current access token and use it to login to the registry with helm.
75
+ try {
76
+ const accessToken = await shellCmd( 'gcloud auth print-access-token' )
77
+ const registryLoginCommand = `helm registry login -u oauth2accesstoken -p ${accessToken}`
78
+
79
+ const loginResult = await shellCmd( `${registryLoginCommand} https://us-docker.pkg.dev` ) // TODO: cmd line param
80
+ } catch( error ) {
81
+ err( error, '<==Error fetching the token' )
82
+ process.exit( 1 )
83
+ }
84
+
85
+ // helm push hello-chart-0.1.0.tgz oci://us-docker.pkg.dev/PROJECT/pubsub-pulse/chart
package/src/circleate.sh CHANGED
@@ -241,6 +241,7 @@ workflows:
241
241
  requires:
242
242
  - install
243
243
  - coverage:
244
+ context: npm
244
245
  requires:
245
246
  - install
246
247
  - docs:
@@ -413,6 +414,7 @@ workflows:
413
414
  requires:
414
415
  - install
415
416
  - coverage:
417
+ context: npm
416
418
  requires:
417
419
  - install
418
420
  - docs:
package/src/dirty-git.sh CHANGED
@@ -1,13 +1,20 @@
1
1
  #!/bin/bash
2
-
2
+ #
3
+ # Unicode character sets here:
4
+ # ://en.wikipedia.org/wiki/List_of_Unicode_characters
5
+ # start looking around dingbats (3/4 down page"
6
+ #
3
7
  CLEAN="\e[32m✔\e[0m"
4
8
  DIRTY="\e[31m✘\e[0m"
5
9
  STASH="\e[33;44m$\e[0m"
6
10
  AHEAD="\e[34;42m!\e[0m"
11
+ #NOHED="\e[31m✖\e[0m"
12
+ NOHED="\e[31;43m⚑\e[0m"
7
13
  LOCKD="\e[35m\e[0m"
14
+ ELAS7="\e[33m7\e[0m"
8
15
 
9
16
  clear
10
- printf "${CLEAN} clean ${DIRTY} dirty ${STASH} stashed ${AHEAD} unpushed ${LOCKD} locked\n\n"
17
+ printf "${CLEAN} clean ${DIRTY} dirty ${STASH} stashed ${AHEAD} unpushed ${NOHED} no remote ${LOCKD} locked\n\n"
11
18
  for dir in $@;
12
19
  do
13
20
  [ ! -d $dir ] || [ ! -d $dir/.git ] && continue
@@ -16,9 +23,15 @@ do
16
23
  [[ `git status --porcelain` ]] && status="$DIRTY" || status="$CLEAN"
17
24
  scount=`git stash list | wc -l`
18
25
  [ $scount -gt 0 ] && stash="\e[33;44m$\e[0m" || stash=" "
19
- ahead=`git rev-list FETCH_HEAD..HEAD --count`
20
- [ $ahead -gt 0 ] && ahead="$AHEAD" || ahead=" "
26
+ ahead=`git rev-list FETCH_HEAD..HEAD --count 2>/dev/null`
27
+ if [ -z "$ahead" ];
28
+ then
29
+ ahead="$NOHED" # "✖" # "❓"
30
+ else
31
+ [ $ahead -gt 0 ] && ahead="$AHEAD" || ahead=" "
32
+ fi
21
33
  [ -f "Versions.json" ] && locked="$LOCKD" || locked=" "
34
+ [ ! -d "elasticsearch8" ] && elastic="$ELAS7" || elastic=" "
22
35
  cd - &>/dev/null
23
- printf "${status} %-28s ${stash}${ahead}${locked} %s\n" $dir $branch
36
+ printf "${status} %-28s ${stash}${ahead}${locked}${elastic} %s\n" $dir $branch
24
37
  done
@@ -1,5 +1,5 @@
1
1
  image:
2
- tag: # v5.4.4
2
+ tag: # v5.1.2
3
3
 
4
4
  config:
5
5
  LOG_CONFIG: '{"type":"pino","level":"warn"}'
@@ -3,3 +3,5 @@ image:
3
3
 
4
4
  config:
5
5
  LOG_CONFIG: '{"type":"pino","level":"warn"}'
6
+ IN_MEM_CONTROLLER_ACTIVE: "false"
7
+ USE_MEMORY_CONTROLLER_CHECK_MODE : "false"
@@ -0,0 +1,11 @@
1
+ nameOverride: "db-curator-dh"
2
+
3
+ image:
4
+ tag: # v4.2.0
5
+
6
+ config:
7
+ LOG_CONFIG: '{"type":"pino","level":"warn"}'
8
+
9
+ TSDB_CLEANUP_ENABLED: "true"
10
+ FIREBASE_CLEANUP_ENABLED: "false"
11
+ TSDB_HOST: "timescale-dense-history-postgresql"
@@ -1,5 +1,5 @@
1
1
  image:
2
- tag: # v2.7.0
2
+ tag: # v2.8.0
3
3
 
4
4
  config:
5
5
  LOG_CONFIG: '{"type":"pino","level":"warn"}'
@@ -4,10 +4,11 @@ showInstalling "PostgreSQL Database"
4
4
 
5
5
  errorIfMissingSecret authz-postgres
6
6
 
7
- addBitnamiRepo
7
+ addBitnamiRepo # latest
8
8
 
9
+ [ -z "$POSTGRESQL_CHART_VERSION" ] && POSTGRESQL_CHART_VERSION="10"
9
10
  helm upgrade --install postgres bitnami/postgresql \
10
11
  --values postgres/postgres-local.yaml \
11
- --version 10 $HELM_WHAT
12
+ --version $POSTGRESQL_CHART_VERSION $HELM_WHAT
12
13
 
13
14
  removeHelmRepo bitnami
@@ -1,5 +1,5 @@
1
1
  image:
2
- tag: # v1.0.1
2
+ tag: # v1.1.0
3
3
 
4
4
  config:
5
5
  LOG_CONFIG: '{"type":"pino","level":"warn"}'
@@ -1,7 +1,7 @@
1
1
  nameOverride: transponder-bq
2
2
 
3
3
  image:
4
- tag: # v5.0.1
4
+ tag: # v5.0.3
5
5
 
6
6
  config:
7
7
  TRANSPONDER_RUN_MODE: "bigQueryJson"
@@ -1,7 +1,7 @@
1
1
  nameOverride: transponder-rt
2
2
 
3
3
  image:
4
- tag: v5.0.1
4
+ tag: # v5.0.3
5
5
 
6
6
  config:
7
7
  TRANSPONDER_RUN_MODE: "rt"
@@ -7,7 +7,7 @@
7
7
  nameOverride: transponder-tsdb
8
8
 
9
9
  image:
10
- tag: # v5.0.1
10
+ tag: # v5.0.3
11
11
 
12
12
  config:
13
13
  TRANSPONDER_RUN_MODE: "timescale"
@@ -15,7 +15,7 @@ config:
15
15
 
16
16
  TRANSPORT_CONFIG: '{
17
17
  "type": "pubsub",
18
- "projectId": "OVH:<PROJECT_NAME>",
18
+ "projectId": "OVH:<PROJECT_ID>",
19
19
  "publisher": {
20
20
  "batching": {
21
21
  "maxMilliseconds": 0,
package/src/helmup.sh CHANGED
@@ -690,8 +690,8 @@ CATBACKUP
690
690
  installDefaultConfigs
691
691
  ;;
692
692
 
693
- db-curator*)
694
- # db-curator / db-curator-dh diffs are defined in values-local.yaml
693
+ db-curator-dh)
694
+ # db-curator-dh is a variant of db-curator with diff controlled in values-local.yaml
695
695
  HELMUP="helm upgrade --install $SERVICE leverege/db-curator --values $SERVICE/values.yaml $CHARTVER $HELM_WHAT"
696
696
  doHelmup "$HELMUP"
697
697
  ;;