@leverege/build-tools 2.9.4 → 2.9.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.
@@ -76,6 +76,15 @@ const context = args.context || gitBranch;
76
76
  if (context === 'master') {
77
77
  console.log('***ERROR: master context is forbidden; change to a different branch\n\n');
78
78
  process.exit(1);
79
+ }
80
+
81
+ if (!fs.existsSync('overwhelm.yaml')) {
82
+ console.log(chalk.red.bold(`
83
+
84
+ ***ERROR overwhelm => missing the overwhelm.yaml file - this command expects
85
+ to execute from within a platform-k8s branch
86
+ `));
87
+ process.exit(1);
79
88
  } // Load the default values and then overlay with the project specific yaml
80
89
  // values. This supports the notion of this type of approach in the
81
90
  // overwhelm yaml settings:
Binary file
@@ -76,6 +76,15 @@ const context = args.context || gitBranch;
76
76
  if (context === 'master') {
77
77
  console.log('***ERROR: master context is forbidden; change to a different branch\n\n');
78
78
  process.exit(1);
79
+ }
80
+
81
+ if (!fs.existsSync('overwhelm.yaml')) {
82
+ console.log(chalk.red.bold(`
83
+
84
+ ***ERROR overwhelm => missing the overwhelm.yaml file - this command expects
85
+ to execute from within a platform-k8s branch
86
+ `));
87
+ process.exit(1);
79
88
  } // Load the default values and then overlay with the project specific yaml
80
89
  // values. This supports the notion of this type of approach in the
81
90
  // overwhelm yaml settings:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.9.4",
3
+ "version": "2.9.5",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -20,7 +20,6 @@
20
20
  "test": "echo \"Error: no test specified\" && exit 1"
21
21
  },
22
22
  "bin": {
23
- "anchor": "src/anchor",
24
23
  "build-tools": "src/build-tools.js",
25
24
  "circleate": "src/circleate",
26
25
  "decrypt-secrets": "src/decrypt-secrets",
package/src/helmup CHANGED
@@ -529,7 +529,7 @@ function getServiceAndChartVersion() {
529
529
  CHARTVER=${LCL_CHART#*/Chart-}
530
530
  cat<<DEPRECATED_CHART
531
531
  $YELO_WARN The use of $SERVICE/$LCL_CHART to lock the chart version has
532
- been deprecated. Create a top level `color g "Charts.json"` file instead:
532
+ been deprecated. Create a top level `color g "Versions.json"` file instead:
533
533
 
534
534
  {
535
535
  "scheduler" : "3.6.1",
@@ -544,7 +544,7 @@ DEPRECATED_CHART
544
544
  local VERSIONS="./Versions.json"
545
545
  if [ -f "$VERSIONS" ];
546
546
  then
547
- CHARTVER=`node -e "charts=require('$VERSIONS');console.log( charts['$SERVICE'].chart || '' )"`
547
+ CHARTVER=`node -e "charts=require('$VERSIONS');console.log( charts['$SERVICE'].chart || '' )"&>/dev/null`
548
548
  fi
549
549
  }
550
550
 
package/src/overwhelm.js CHANGED
@@ -39,6 +39,15 @@ if ( context === 'master' ) {
39
39
  process.exit( 1 )
40
40
  }
41
41
 
42
+ if ( !fs.existsSync( 'overwhelm.yaml' ) ) {
43
+ console.log( chalk.red.bold( `
44
+
45
+ ***ERROR overwhelm => missing the overwhelm.yaml file - this command expects
46
+ to execute from within a platform-k8s branch
47
+ ` ) )
48
+ process.exit( 1 )
49
+ }
50
+
42
51
  // Load the default values and then overlay with the project specific yaml
43
52
  // values. This supports the notion of this type of approach in the
44
53
  // overwhelm yaml settings:
package/src/anchor DELETED
@@ -1,41 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Load the standard helper functions
4
- . `build-tools --bashfun`
5
-
6
- if [ -z "$1" ] || [ -z "$2" ];
7
- then
8
- cat<<USAGE
9
-
10
- $(color g "Usage: anchor <service name> <chart version>\n")
11
-
12
- USAGE
13
- exit 1
14
- fi
15
-
16
- SERVICE=$1
17
- VERSION=$2
18
- ANCHOR="${SERVICE}/Chart-${VERSION}"
19
-
20
- if compgen -G "${SERVICE}/Chart-*" > /dev/null ;
21
- then
22
- cat<<ALREADY_ANCHORED
23
-
24
- $(color r "$SERVICE is already anchored")
25
- $(color y "Go remove the existing anchor from ${SERVICE} and try again")
26
-
27
- `/bin/ls ${SERVICE}/Chart*`
28
-
29
- ALREADY_ANCHORED
30
- exit 1
31
- fi
32
-
33
- printf "Locking $SERVICE chart version at $VERSION\n"
34
- touch ${ANCHOR}
35
-
36
- if [ -f "${ANCHOR}" ];
37
- then
38
- printf "Service locked with creation of ${ANCHOR}\n"
39
- else
40
- printf "***ERROR: failed to create anchor ${ANCHOR}\n"
41
- fi