@leverege/build-tools 2.115.1 → 2.115.2

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.115.1",
3
+ "version": "2.115.2",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -38,6 +38,7 @@
38
38
  "generate-docs": "src/generate-docs.mjs",
39
39
  "getfbcfg": "src/getfbcfg.mjs",
40
40
  "getjson": "src/getjson.mjs",
41
+ "gh-audit-log": "src/gh-audit-log.mjs",
41
42
  "git-tar": "src/git-tar.sh",
42
43
  "github-actions-it": "src/github-actions-it.mjs",
43
44
  "helm-audit": "src/helm-audit.mjs",
@@ -89,7 +90,7 @@
89
90
  }
90
91
  },
91
92
  "dependencies": {
92
- "@kubernetes/client-node": "^1.4.0",
93
+ "@kubernetes/client-node": "^2.0.0",
93
94
  "@leverege/jsdoc-template": "^1.0.1",
94
95
  "chalk": "^6.0.0",
95
96
  "command-line-args": "^6.0.2",
@@ -100,10 +101,10 @@
100
101
  "execa": "^10.0.1",
101
102
  "find-yarn-workspace-root": "^2.0.0",
102
103
  "glob": "^13.0.6",
103
- "googleapis": "^174.0.1",
104
+ "googleapis": "^176.0.0",
104
105
  "handlebars": "^4.7.9",
105
106
  "ignore": "^7.0.6",
106
- "inquirer": "^14.0.2",
107
+ "inquirer": "^14.1.0",
107
108
  "js-yaml": "^4.2.0",
108
109
  "jsdoc": "^4.0.5",
109
110
  "ms": "^2.1.3",
@@ -124,6 +124,29 @@ SKIP_CNPG_SA_CREATION
124
124
  gsutil ubla set on $BARMAN_BUCKET # uniform bucket access
125
125
  fi
126
126
 
127
+ # Apply WAL lifecycle policy idempotently: Coldline after 7 days, delete after 30.
128
+ # Matches the 21-day snapshot retention window with buffer.
129
+ if gsutil lifecycle get $BARMAN_BUCKET 2>/dev/null | grep -q "COLDLINE"; then
130
+ printf "\nBarman bucket lifecycle already configured - skipping\n"
131
+ else
132
+ printf "\nApplying lifecycle policy to barman bucket `color g $BARMAN_BUCKET`\n"
133
+ cat<<LIFECYCLE | gsutil lifecycle set /dev/stdin $BARMAN_BUCKET
134
+ {
135
+ "rule": [
136
+ {
137
+ "action": {"type": "SetStorageClass", "storageClass": "COLDLINE"},
138
+ "condition": {"age": 7}
139
+ },
140
+ {
141
+ "action": {"type": "Delete"},
142
+ "condition": {"age": 30}
143
+ }
144
+ ]
145
+ }
146
+ LIFECYCLE
147
+ exitOnError $? "Failed to set lifecycle policy on $BARMAN_BUCKET"
148
+ fi
149
+
127
150
  # define the snapshot storage class
128
151
  printf "\nApplying the CNPG VolumeSnapshotClass `color g cnpg-snapshotclass` definition\n"
129
152
  cat<<EOSNAPSC | kubectl apply -f -
@@ -3,7 +3,7 @@
3
3
  # See => https://cloudnative-pg.io/documentation/current/installation_upgrade/
4
4
  #
5
5
  OPVER="1.26.1" # 10/08/2025
6
- BARMAN_VER="0.11.0"
6
+ BARMAN_VER="0.14.0"
7
7
 
8
8
  createNamespaceIfNeeded cnpg-system
9
9
 
package/src/helmup.sh CHANGED
@@ -59,7 +59,7 @@ for arg in "$@"; do
59
59
  export BUILD_TOOLS_DEBUG=1
60
60
  ;;
61
61
  --dry-run)
62
- export HELM_WHAT="--dry-run --debug"
62
+ export HELM_WHAT="--dry-run=client --debug"
63
63
  export K8S_WHAT="--dry-run=server -o yaml"
64
64
  ;;
65
65
  *)
@@ -741,7 +741,7 @@ function doInstall() {
741
741
  [ ! -z "$CHARTVER" ] && CHARTVER="--version $CHARTVER"
742
742
 
743
743
  # set the dry-run flag on what
744
- [ "$INVOKED_AS" == "helmwhat" ] && HELM_WHAT="--dry-run --debug" && K8S_WHAT="--dry-run=server -o yaml"
744
+ [ "$INVOKED_AS" == "helmwhat" ] && HELM_WHAT="--dry-run=client --debug" && K8S_WHAT="--dry-run=server -o yaml"
745
745
 
746
746
  # helminit is used to redeploy an existing service
747
747
  if [[ "$INVOKED_AS" == "helminit" ]] && isLeveregeService $SERVICE;
package/src/overwhelm.mjs CHANGED
@@ -400,6 +400,9 @@ log( `\n\nExecuting: ${chalk.bold.yellow( cmd )}\n\n` )
400
400
  try {
401
401
  await shellCmd( cmd )
402
402
  } catch ( error ) {
403
- err( { error, cmd }, '***ERROR overwhelm' )
403
+ if ( error.stderr ) {
404
+ err( chalk.red( error.stderr ) )
405
+ }
406
+ err( chalk.red( '\n***ERROR: failed to fetch the Kubernetes context\n' ) )
404
407
  process.exit( 1 )
405
408
  }
@@ -29,7 +29,10 @@ const CHECKS = [
29
29
  label : 'cir',
30
30
  fn : ( { gitRoot } ) => {
31
31
  const cfgPath = path.join( gitRoot, '.circleci', 'config.yml' )
32
- if ( !fs.existsSync( cfgPath ) ) return { value : SYM_BAD }
32
+ if ( !fs.existsSync( cfgPath ) ) {
33
+ const hasGHA = fs.existsSync( path.join( gitRoot, '.github', 'workflows', 'ci.yml' ) )
34
+ return { value : hasGHA ? chalk.cyan( '★' ) : SYM_BAD }
35
+ }
33
36
  try {
34
37
  const content = fs.readFileSync( cfgPath, 'utf8' )
35
38
  const match = content.match( /leverege\/circle-nodejs-ci@(\d+\.\d+\.\d+)/ )
@@ -339,7 +342,7 @@ ${chalk.yellow( 'Columns:' )}
339
342
  ${chalk.green( 'tag' )} latest semver git tag (green=match, yellow=mismatch, red=untagged)
340
343
  ${chalk.green( 'name' )} orange if dirty: pull/fetch failed (regular repos) or local modifications present (workspace packages)
341
344
  ${chalk.green( 'scope' )} package scope: @org, PRVT, or PUBL
342
- ${chalk.green( 'cir' )} CI status: ✘=missing, L=legacy, 1=orb v1, green 2/★=orb v2 current, yellow 2/★=orb v2 stale
345
+ ${chalk.green( 'cir' )} CI status: ✘=missing, cyan ★=fully on GHA, L=legacy, 1=orb v1, green 2/★=orb v2 current, yellow 2/★=orb v2 stale
343
346
  ${chalk.green( 'ESM' )} "type": "module" in package.json
344
347
  ${chalk.green( 'har' )} .har directory present at repo root
345
348
  ${chalk.green( 'lnt' )} ESLint version from node_modules (✘=no lint script, ?=not installed, yellow=v8, green=v9+)