@leverege/build-tools 2.12.0 → 2.13.0
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/lib/server/repo-init/config.tgz +0 -0
- package/package.json +3 -3
- package/src/dockreate +21 -7
- package/src/push-my-chart +19 -0
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leverege/build-tools",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"description": "A collection of build / support tools for Leverege developers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@babel/cli": "^7.17.10",
|
|
73
|
-
"@babel/core": "^7.
|
|
73
|
+
"@babel/core": "^7.18.0",
|
|
74
74
|
"@babel/node": "^7.17.10",
|
|
75
75
|
"@leverege/babel-preset-leverege-node": "^2.0.0",
|
|
76
76
|
"@leverege/eslint-config-leverege": "^3.0.1",
|
|
77
|
-
"npm": "^8.
|
|
77
|
+
"npm": "^8.10.0"
|
|
78
78
|
}
|
|
79
79
|
}
|
package/src/dockreate
CHANGED
|
@@ -31,7 +31,12 @@ fi
|
|
|
31
31
|
|
|
32
32
|
function packageJson() {
|
|
33
33
|
result=$(jq -r $1 $GITTOP/package.json)
|
|
34
|
-
[ "$result" != "null" ]
|
|
34
|
+
if [ "$result" != "null" ]
|
|
35
|
+
then
|
|
36
|
+
echo $result
|
|
37
|
+
else
|
|
38
|
+
echo $2
|
|
39
|
+
fi
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
# Global Vars
|
|
@@ -237,9 +242,17 @@ NOCONTAINER
|
|
|
237
242
|
fi
|
|
238
243
|
container=$(basename $gitremote .git)
|
|
239
244
|
fi
|
|
245
|
+
|
|
246
|
+
# registry specifications
|
|
240
247
|
gcimage=gcr.io/$project/$container
|
|
241
|
-
|
|
242
|
-
registry
|
|
248
|
+
|
|
249
|
+
registry=
|
|
250
|
+
artifact=$(packageJson '.leverege.artifact') # 'leverege')
|
|
251
|
+
if [ ! -z "$artifact" ];
|
|
252
|
+
then
|
|
253
|
+
imagerepo=us-docker.pkg.dev/leverege-registry
|
|
254
|
+
registry=$imagerepo/$artifact/$container/images
|
|
255
|
+
fi
|
|
243
256
|
|
|
244
257
|
version=$1
|
|
245
258
|
[[ -f '.previous' ]] && previous=`cat .previous` || previous='FIRST BUILD'
|
|
@@ -317,7 +330,7 @@ cat<<IMGINFO
|
|
|
317
330
|
Previous: $(color y $previous)
|
|
318
331
|
DateStamp: $(color g $pckgdts)
|
|
319
332
|
GCImage: $(color g $gcimage:$version)
|
|
320
|
-
Registry: $(color y $registry
|
|
333
|
+
Registry: $(color y $registry)
|
|
321
334
|
|
|
322
335
|
IMGINFO
|
|
323
336
|
|
|
@@ -326,7 +339,7 @@ then
|
|
|
326
339
|
cat<<EOPKG
|
|
327
340
|
$(color y '***WARNING: specified version does not match package.json version' )
|
|
328
341
|
package.json => $(color g "$pckgver")
|
|
329
|
-
specified => $(color r
|
|
342
|
+
specified => $(color r "$version")
|
|
330
343
|
|
|
331
344
|
EOPKG
|
|
332
345
|
if [ $tagging ];
|
|
@@ -389,7 +402,7 @@ fi
|
|
|
389
402
|
|
|
390
403
|
# Tag the container with the node detailsand the culprit.
|
|
391
404
|
gcloud container images add-tag --quiet $gcimage:$version $gcimage:$pckgdts-$nodeimg-$USER
|
|
392
|
-
if [
|
|
405
|
+
if [ ! -z "$artifact" ];
|
|
393
406
|
then
|
|
394
407
|
cat<<END_ARTY
|
|
395
408
|
|
|
@@ -399,7 +412,7 @@ then
|
|
|
399
412
|
`color g 'Thank you for testing!'`
|
|
400
413
|
|
|
401
414
|
END_ARTY
|
|
402
|
-
gcloud container images add-tag --quiet $gcimage:$version $registry:$version &
|
|
415
|
+
time gcloud container images add-tag --quiet $gcimage:$version $registry:$version $registry:$pckgdts-$nodeimg-$USER &
|
|
403
416
|
fi
|
|
404
417
|
|
|
405
418
|
if [ $tagging ];
|
|
@@ -408,6 +421,7 @@ then
|
|
|
408
421
|
git tag -af $1 -m "Docker version $1"
|
|
409
422
|
git push --follow-tags
|
|
410
423
|
gcloud container images add-tag --quiet $gcimage:$version $gcimage:latest
|
|
424
|
+
[ ! -z "$artifact" ] && gcloud container images add-tag --quiet $registry:$version $registry:latest
|
|
411
425
|
else
|
|
412
426
|
printf "\n$(color y '*** Skipped git tagging - beta release')\n\n"
|
|
413
427
|
fi
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const execa = require( 'execa' )
|
|
4
|
+
const semverLt = require( 'semver/functions/lt' )
|
|
5
|
+
|
|
6
|
+
const pushItGood = async () => {
|
|
7
|
+
const version = await execa( 'helm', [ 'version', '--short' ] )
|
|
8
|
+
const pusher = ( semverLt( version.stdout, '3.7.0' ) ? 'push' : 'cm-push' )
|
|
9
|
+
|
|
10
|
+
try {
|
|
11
|
+
const museum = await execa ( 'helm', [ pusher, 'helm', 'leverege' ] )
|
|
12
|
+
console.log( museum.stdout )
|
|
13
|
+
} catch ( ex ) {
|
|
14
|
+
console.log( ex.stderr )
|
|
15
|
+
process.exit( 1 )
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
pushItGood()
|