@leverege/build-tools 2.47.4 → 2.47.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.47.
|
|
3
|
+
"version": "2.47.5",
|
|
4
4
|
"description": "A collection of build / support tools for Leverege developers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -77,6 +77,6 @@
|
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@leverege/eslint-config-leverege": "^4.2.0",
|
|
80
|
-
"npm": "^10.
|
|
80
|
+
"npm": "^10.5.0"
|
|
81
81
|
}
|
|
82
82
|
}
|
package/src/Docker.mjs
CHANGED
|
@@ -85,8 +85,7 @@ const pluginTemplate = `
|
|
|
85
85
|
# a best practice.
|
|
86
86
|
`
|
|
87
87
|
|
|
88
|
-
const bashrcTemplate =
|
|
89
|
-
#!/bin/bash
|
|
88
|
+
const bashrcTemplate = `#!/bin/bash
|
|
90
89
|
#
|
|
91
90
|
alias h=history
|
|
92
91
|
|
|
@@ -117,12 +116,16 @@ cmetrics()
|
|
|
117
116
|
|
|
118
117
|
cmstat()
|
|
119
118
|
{
|
|
120
|
-
wget -qO- localhost:5111
|
|
119
|
+
wget -qO- localhost:5111
|
|
121
120
|
}
|
|
122
121
|
|
|
123
122
|
cmclear()
|
|
124
123
|
{
|
|
125
|
-
cmstat
|
|
124
|
+
# Future me - thinking this should call cmstat and pass in the endpoint as
|
|
125
|
+
# a parameter? Well don't do it - without escaping the dollar 1 in cmstat
|
|
126
|
+
# the port will end up being 51111, and escaping causes linting to complain
|
|
127
|
+
# about unnecessary escaping.
|
|
128
|
+
wget -qO- localhost:5111/status/clear
|
|
126
129
|
}
|
|
127
130
|
|
|
128
131
|
dunm() {
|
|
@@ -283,6 +286,7 @@ const repoCleanup = async () => {
|
|
|
283
286
|
'docker/.keep',
|
|
284
287
|
'docker/.npmrc',
|
|
285
288
|
'docker/.gitignore',
|
|
289
|
+
'docker/.previous',
|
|
286
290
|
'docker/Dockerfile',
|
|
287
291
|
'docker/workspace',
|
|
288
292
|
]
|
package/src/Utils.mjs
CHANGED
|
@@ -334,7 +334,7 @@ export const parseHelmChart = async ( helmroot = './helm' ) => {
|
|
|
334
334
|
} )
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
export const analyzeRepository = async () => {
|
|
337
|
+
export const analyzeRepository = async ( giveGuidance ) => {
|
|
338
338
|
const gitRoot = await getGitRootDirectory()
|
|
339
339
|
const subPkgs = await glob( `${gitRoot}/packages/**/package.json`, { ignore : '/**/node_modules/**' } )
|
|
340
340
|
const helmChart = await parseHelmChart()
|
|
@@ -382,6 +382,12 @@ export const analyzeRepository = async () => {
|
|
|
382
382
|
} catch ( error ) {
|
|
383
383
|
errorExit( error )
|
|
384
384
|
}
|
|
385
|
+
|
|
386
|
+
if ( giveGuidance ) {
|
|
387
|
+
// let npm build run in guidance mode
|
|
388
|
+
await shellCmd( 'npm run build' )
|
|
389
|
+
}
|
|
390
|
+
|
|
385
391
|
const containerName = closestPackageJson.name
|
|
386
392
|
const artifactProject = closestPackageJson.artifactRegistry.project
|
|
387
393
|
const artifactRegistry = closestPackageJson.leverege.registry
|
package/src/cnpg-snapshot.mjs
CHANGED
|
@@ -33,6 +33,6 @@ const tmpfile = temporaryFile()
|
|
|
33
33
|
|
|
34
34
|
debug( { replaced, tmpfile }, '<==Apply That' )
|
|
35
35
|
|
|
36
|
-
fs.writeFileSync( tmpfile, replaced )
|
|
36
|
+
fs.writeFileSync( tmpfile, replaced ) // eslint-disable-line security/detect-non-literal-fs-filename
|
|
37
37
|
await shellCmd( 'overwhelm' )
|
|
38
38
|
await shellCmd( `kubectl apply -f ${tmpfile}` )
|
|
@@ -29,6 +29,9 @@ if ( !imageVersion ) {
|
|
|
29
29
|
errorExit( '***Error: docker-to-registry requires an image version' )
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
// may use guide-me or guideme to ask for update guidance
|
|
33
|
+
const giveGuidance = imageVersion.match( /^guide-*me$/ ) !== null
|
|
34
|
+
|
|
32
35
|
const willGitTag = imageVersion.match( /^v\d+\.\d+\.\d+$/ )
|
|
33
36
|
const tagInfo = willGitTag ?
|
|
34
37
|
chalk.yellow.bold( 'will be git tagged' ) :
|
|
@@ -67,7 +70,7 @@ if ( !fs.existsSync( './helm' ) ) {
|
|
|
67
70
|
process.exit( 1 )
|
|
68
71
|
}
|
|
69
72
|
|
|
70
|
-
const repoDescr = await analyzeRepository()
|
|
73
|
+
const repoDescr = await analyzeRepository( giveGuidance )
|
|
71
74
|
debug( { repoDescr }, '<==The Repo Description' )
|
|
72
75
|
|
|
73
76
|
const dockerInfo = await docker.generateDockerfile()
|
|
@@ -82,7 +85,7 @@ const {
|
|
|
82
85
|
isNpmWorkspace,
|
|
83
86
|
} = repoDescr
|
|
84
87
|
|
|
85
|
-
if (
|
|
88
|
+
if ( giveGuidance ) {
|
|
86
89
|
await docker.validateCloudBuildBucket( artifactProject )
|
|
87
90
|
}
|
|
88
91
|
|
|
@@ -92,7 +95,7 @@ const registryFolder = `${artifactRegistry}/images/${containerName}`
|
|
|
92
95
|
log( chalk.green.bold( 'Updating dependencies and workspace...' ) )
|
|
93
96
|
await shellCmd( 'npm install', { stdio : 'inherit' } )
|
|
94
97
|
|
|
95
|
-
if (
|
|
98
|
+
if ( giveGuidance ) {
|
|
96
99
|
await docker.repoCleanup() // adjusts gitignore files and removes cruft
|
|
97
100
|
/* eslint-disable max-len */
|
|
98
101
|
log( `
|
|
@@ -4,7 +4,7 @@ showInstalling "Redis"
|
|
|
4
4
|
|
|
5
5
|
OCI_CHART="oci://registry-1.docker.io/bitnamicharts/redis"
|
|
6
6
|
|
|
7
|
-
[ -z "$REDIS_CHART_VERSION" ] && REDIS_CHART_VERSION="18.
|
|
7
|
+
[ -z "$REDIS_CHART_VERSION" ] && REDIS_CHART_VERSION="18.16.1"
|
|
8
8
|
|
|
9
9
|
helm upgrade --install redis $OCI_CHART \
|
|
10
10
|
--values redis/redis-local.yaml \
|
|
@@ -13,11 +13,13 @@ deployment:
|
|
|
13
13
|
logs:
|
|
14
14
|
general:
|
|
15
15
|
format: json
|
|
16
|
-
level: WARN # DEBUG
|
|
16
|
+
level: WARN # INFO # DEBUG
|
|
17
17
|
access:
|
|
18
18
|
enabled: true
|
|
19
19
|
format: json
|
|
20
|
-
|
|
20
|
+
# fields:
|
|
21
|
+
# headers:
|
|
22
|
+
# defaultmode: keep
|
|
21
23
|
|
|
22
24
|
# Custom entry points may be added here - the first two are port definitions
|
|
23
25
|
# for both unsecured and secured MQTT ports used by connect. Note that the
|