@leverege/build-tools 1.8.4 → 1.10.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.
@@ -119,7 +119,9 @@ jobs:
119
119
 
120
120
  - run:
121
121
  name: Check for vulnerabilities
122
- command: npm run vuln
122
+ command: |
123
+ sudo npm install -g npm@latest
124
+ npm audit --production
123
125
 
124
126
  - run:
125
127
  name: Check for LICENSE and README files
@@ -301,7 +303,9 @@ jobs:
301
303
 
302
304
  - run:
303
305
  name: Check for vulnerabilities
304
- command: npm run vuln
306
+ command: |
307
+ sudo npm install -g npm@latest
308
+ npm audit --production
305
309
 
306
310
  - run:
307
311
  name: Check for LICENSE and README files
File without changes
package/lib/server/helmdn CHANGED
@@ -77,6 +77,11 @@ function doNuking() {
77
77
  doNuking "${PLATFORM[@]}" && exit $?
78
78
  fi
79
79
 
80
+ if [ "$SERVICE" == "system" ];
81
+ then
82
+ doNuking "${SYSTEM[@]}" && exit $?
83
+ fi
84
+
80
85
  if [ "$SERVICE" == "ingress" ];
81
86
  then
82
87
  clearlyWarn
@@ -46,7 +46,8 @@ spec:
46
46
  selector:
47
47
  app: $chartname
48
48
  ports:
49
- - protocol: TCP
49
+ - name: $chartname-input
50
+ protocol: TCP
50
51
  port: {{ .Values.$chartname_go.SERVER_PORT }}
51
52
  targetPort: api
52
53
  SVC_YAML
@@ -98,7 +99,7 @@ CHARTYAML
98
99
  cat<<VALUESYAML > values.yaml
99
100
  # List your env variables here
100
101
  $chartname_go:
101
- VERSION: v$PACKAGE_VERSION
102
+ VERSION: vX.Y.Z
102
103
  SERVER_PORT: 8080
103
104
  IMAGE: gcr.io/leverege-docker-images/$chartname
104
105
 
@@ -108,7 +109,7 @@ default:
108
109
  MAX_CHILD_PROCESSES: "1"
109
110
 
110
111
  MODEL_FIREBASE_SERVICE_ACCOUNT: /var/config/keys/model-data
111
- MODEL_FIREBASE_DATABASE_URL: <firebase URL>
112
+ MODEL_FIREBASE_DATABASE_URL: https://OVH:<PROJECT_NAME>.firebaseio.com
112
113
  MODEL_FIREBASE_CONFIG: /var/config/keys/model-data-config
113
114
 
114
115
  SECRET_KEY: key.json
@@ -191,34 +192,39 @@ spec:
191
192
  - name: pubsub-key
192
193
  secret:
193
194
  secretName: pubsub
194
- # UNCOMMENT TO USE PRE-EMPTIBLES
195
- # tolerations:
196
- # - key: "preemptible"
197
- # operator: "Equal"
198
- # value: "true"
199
- # effect: "NoSchedule"
200
- # affinity:
201
- # podAntiAffinity:
202
- # preferredDuringSchedulingIgnoredDuringExecution:
203
- # - weight: 100
204
- # podAffinityTerm:
205
- # labelSelector:
206
- # matchExpressions:
207
- # - key: app
208
- # operator: In
209
- # values:
210
- # - api-server
211
- # topologyKey: kubernetes.io/hostname
212
- # nodeAffinity:
213
- # preferredDuringSchedulingIgnoredDuringExecution:
214
- # - preference:
215
- # matchExpressions:
216
- # - key: cloud.google.com/gke-preemptible
217
- # operator: Exists
218
- # weight: 50
195
+ {{- if (.Values.$chartname_go.PREEMPTIBLE) and eq .Values.$chartname_go.PREEMPTIBLE "true" }}
196
+ tolerations:
197
+ - key: "preemptible"
198
+ operator: "Equal"
199
+ value: "true"
200
+ effect: "NoSchedule"
201
+ affinity:
202
+ podAntiAffinity:
203
+ preferredDuringSchedulingIgnoredDuringExecution:
204
+ - weight: 100
205
+ podAffinityTerm:
206
+ labelSelector:
207
+ matchExpressions:
208
+ - key: app
209
+ operator: In
210
+ values:
211
+ - api-server
212
+ topologyKey: kubernetes.io/hostname
213
+ nodeAffinity:
214
+ preferredDuringSchedulingIgnoredDuringExecution:
215
+ - preference:
216
+ matchExpressions:
217
+ - key: cloud.google.com/gke-preemptible
218
+ operator: Exists
219
+ weight: 50
220
+ {{- end }}
219
221
  containers:
220
222
  - name: $chartname
221
223
  image: gcr.io/leverege-docker-images/$chartname:{{ .Values.$chartname_go.VERSION }}
224
+ imagePullPolicy: Always
225
+ securityContext:
226
+ runAsUser: 1000
227
+ allowPrivilegeEscalation: false
222
228
  resources:
223
229
  requests:
224
230
  cpu: "10m"
package/lib/server/helmup CHANGED
@@ -3,9 +3,12 @@
3
3
  # This script is used to ease the pain of transition testing to chart museum
4
4
  # prior to setting up keel for new clusters / installs.
5
5
  #
6
+ # Removing db-curator from the list of platform components for now. It needs
7
+ # to be turned into a cronjob to avoid having it run as soon as it gets
8
+ # deployed.
9
+ #
6
10
  PLATFORM=(
7
11
  api-server
8
- db-curator
9
12
  emailer
10
13
  imagine
11
14
  message-processor
@@ -19,18 +22,112 @@ PLATFORM=(
19
22
 
20
23
  SYSTEM=(
21
24
  descheduler
25
+ disks
22
26
  elastic
27
+ keel
23
28
  monitoring
29
+ polaris
24
30
  redis
25
31
  )
26
32
 
33
+ # Simple ANSI color coded string generator.
34
+ function color() {
35
+ local color=
36
+ case "$1" in
37
+ 'g') color="92m" ;; # green
38
+ 'c') color="96m" ;; # lt blue
39
+ 'y') color="93m" ;; # yellow
40
+ 'r') color="91m" ;; # red
41
+ 'toast') color="1;3;7;91;103;5m" ;;
42
+ esac
43
+ printf "\e[$color$2\e[0m"
44
+ }
45
+ RED_ERROR=`color r '***ERROR:'`
46
+ YELO_WARN="`color y '***WARNING:'`"
47
+
48
+ function setOrUnset() {
49
+ local setting=`color toast "NEEDS TO BE SET"`
50
+ [ ! -z "$1" ] && setting=`color g $1`
51
+ echo "$setting"
52
+ }
53
+
54
+ # Installing keel is a little more involved since we need to feed it svc acct
55
+ # keys and a slack bot token.
56
+ function keelNeeds() {
57
+ cat<<KEELNEEDS
58
+
59
+ $RED_ERROR $1
60
+
61
+ In order to get its job done keel needs the service account JSON file for the
62
+ project containing the docker images that it is reponsible for. It also needs
63
+ a token for the slack bot in order to interact with slack.
64
+
65
+ `color g LEV_KEYS`
66
+ points to the top level directory containing the keys and secrets
67
+ to the k8s clusters
68
+ `color g \$LEV_KEYS/docker-image-svc-acct`
69
+ directory containing the service account JSON files
70
+ `color g "\$LEV_KEYS/<branch-name>/slack-bot-token"`
71
+ location of the slack bot token text file
72
+
73
+ Current settings:
74
+ LEV_KEYS => `setOrUnset $LEV_KEYS`
75
+
76
+ Missing variables should be set using the standard bash syntax:
77
+ `color y export\ VARNAME=\"\<YOUR_SETTING\>\"`
78
+
79
+ KEELNEEDS
80
+ exit 1
81
+ }
82
+
83
+ function installKeel() {
84
+ [ ! -d "$LEV_KEYS" ] &&
85
+ keelNeeds "`color c \\$LEV_KEYS` must point to the keys directory for the clusters."
86
+
87
+ # TODO make the docker image project configurable and not just lev
88
+ SVC_ACCT="$LEV_KEYS/docker-image-svc-acct/leverege-docker-images.json"
89
+ [ ! -f "$SVC_ACCT" ] &&
90
+ keelNeeds "Missing service account info => `color c $SVC_ACCT`"
91
+
92
+ BRANCH=`git rev-parse --abbrev-ref HEAD`
93
+ SLACK_TOKEN="$LEV_KEYS/$BRANCH/slack-bot-token"
94
+ [ ! -f "$SLACK_TOKEN" ] &&
95
+ keelNeeds "Missing slack bot token => `color c $SLACK_TOKEN`"
96
+
97
+ helm repo add keel https://charts.keel.sh; helm repo update
98
+ helm upgrade --install keel keel/keel \
99
+ --set gcr.enabled="true" \
100
+ --set gcr.projectId="leverege-docker-images" \
101
+ --set gcr.pubSub.enabled="true" \
102
+ --set slack.enabled="true" \
103
+ --set slack.channel="devs-cicd" \
104
+ --set slack.approvalsChannel="cd-approvals" \
105
+ --set slack.botName="$BRANCH" \
106
+ --set slack.token="$(cat $SLACK_TOKEN)" \
107
+ --set googleApplicationCredentials="$(cat $SVC_ACCT | base64 -w 0)"
108
+ }
109
+
110
+ # ---------- helmup MAIN ----------
111
+ command -v chartmuseum &> /dev/null
112
+ if [ $? -ne 0 ];
113
+ then
114
+ cat<<NOMUSEUM
115
+
116
+ $RED_ERROR Missing chartmuseum. Head over to the wiki site and follow the
117
+ instructions in the section entitled Installing ChartMuseum down
118
+ in the How-to articles -> Helm Charts via ChartMuseum.
119
+
120
+ NOMUSEUM
121
+ exit 1
122
+ fi
123
+
27
124
  GITTOP=`git rev-parse --show-toplevel`
28
125
  cd $GITTOP
29
126
 
30
127
  npm run ahoy
31
128
  [ $? -ne 0 ] && printf "\n\n***Aborting helmup...\n\n" && exit 1
32
129
 
33
- helm repo update && helm search chartmuseum
130
+ helm repo update &> /dev/null && helm search chartmuseum
34
131
 
35
132
  function doInstall() {
36
133
 
@@ -52,32 +149,78 @@ function doInstall() {
52
149
  helm upgrade --install descheduler akomljen-charts/descheduler --set schedule="*/13 * * * *"
53
150
  ;;
54
151
 
152
+ "disks")
153
+ helm upgrade --install disks ./disks
154
+ ;;
155
+
55
156
  "elastic"|"elasticsearch")
56
157
  helm repo add elastic https://helm.elastic.co
57
158
  helm upgrade --install elasticsearch elastic/elasticsearch --version 7.2.0
58
159
  ;;
59
160
 
161
+ "keel")
162
+ installKeel # because it's a little more involved
163
+ ;;
164
+
60
165
  "monitoring")
61
166
  helm dep up ./monitoring && helm upgrade --install monitoring ./monitoring
62
167
  ;;
63
168
 
169
+ "polaris")
170
+ helm repo add reactiveops-stable https://charts.reactiveops.com/stable
171
+ helm upgrade --install polaris reactiveops-stable/polaris --namespace polaris
172
+ printf "\n***Proxy 8080 with this=> kubectl port-forward --namespace polaris svc/polaris-dashboard 8080:80\n\n"
173
+ ;;
174
+
64
175
  "redis")
65
176
  # https://github.com/helm/charts/tree/master/stable/redis
66
177
  helm upgrade --install redis stable/redis \
67
178
  --set usePassword=false,cluster.slaveCount=3,networkPolicy.enabled=true,metrics.enabled=true
68
179
  ;;
69
180
 
181
+ "timescale-db")
182
+ helm dep up ./timescale-db && helm upgrade --install timescale-db ./timescale-db
183
+ ;;
184
+
70
185
  "ingress")
71
186
  helm upgrade --install ingress ./ingress
72
187
  ;;
73
188
 
74
189
  *)
75
- [ ! -d $SERVICE ] && continue
76
- [ ! -f $SERVICE/values-local.yaml ] && continue
190
+ if [ ! -d $SERVICE ] || [ ! -f $SERVICE/values-local.yaml ];
191
+ then
192
+ printf "\n$YELO_WARN Skipping unknown service => $SERVICE\n\n"
193
+ continue
194
+ fi
77
195
 
78
196
  printf "\n--------------------------------------------------------------\nCharting $SERVICE\n"
79
- helm upgrade --install $SERVICE chartmuseum/$SERVICE -f $SERVICE/values.yaml
80
- [ $? -ne 0 ] && printf "The $SERVICE chart failed - you have issues.\n"
197
+ # By default the museum chart name will be the same as the service, but
198
+ # we have the flexibility to override the naming when the charts are
199
+ # reference by the downstream repositories via the .helmup-charmuseum file.
200
+ OVERRIDE="$SERVICE/.helmup-chartmuseum"
201
+ MUSEUM=$SERVICE
202
+ if [ -f $OVERRIDE ];
203
+ then
204
+ MUSEUM=$(<${OVERRIDE})
205
+ printf "\n$YELO_WARN Local chartmuseum name override from ${SERVICE} to ${MUSEUM}\n"
206
+ fi
207
+ helm upgrade --install $SERVICE chartmuseum/$MUSEUM -f $SERVICE/values.yaml 2> /dev/null
208
+ if [ $? -ne 0 ];
209
+ then
210
+ cat<<NOTRUNNING
211
+
212
+ $RED_ERROR The $SERVICE chart failed to upgrade or install. Is chartmuseum up
213
+ and running on the proper port? Try firing it up with:
214
+
215
+ chartmuseum \\
216
+ --port="8080" \\
217
+ --storage-google-bucket="leverege-helm-charts" \\
218
+ --storage-google-prefix="" \\
219
+ --storage="google" &> /dev/null &
220
+
221
+ NOTRUNNING
222
+ exit 1
223
+ fi
81
224
  ;;
82
225
  esac
83
226
  done
@@ -11,16 +11,19 @@ const ask = require( 'readline-sync' )
11
11
  const YAML = require( 'js-yaml' )
12
12
 
13
13
  const optionsDefinitions = [
14
+ { name : 'context', alias : 'x', type : String, default : '' },
14
15
  { name : 'section', alias : 's', type : String, default : 'default' },
15
16
  { name : 'key', alias : 'k', type : String },
16
17
  { name : 'export', alias : 'e', type : Boolean, default : false },
17
18
  { name : 'continue', alias : 'c', type : Boolean, default : false },
19
+ { name : 'checkctx', alias : 't', type : Boolean, default : false },
18
20
  { name : 'verbose', alias : 'v', type : Boolean, default : false },
19
21
  ]
20
22
  const args = cliArgs( optionsDefinitions )
21
23
 
22
24
  // The kubernetes context is equal to the git branch name.
23
- const context = require( 'git-branch' ).sync()
25
+ const gitBranch = require( 'git-branch' ).sync()
26
+ const context = args.context || gitBranch
24
27
 
25
28
  if ( context == 'master' ) {
26
29
  console.log( '***ERROR: master context is forbidden; change to a different branch\n\n' )
@@ -36,15 +39,17 @@ if ( context == 'master' ) {
36
39
  // my-project:
37
40
  // GCE_MACHINE : "n1-highcpu-8"
38
41
  //
39
- // where the my-project specific setting may override the default if it
40
- // needs a beefier deployment. Any setting can be defaulted in this
41
42
  // fashion, but it is advised not to set a default region with this
42
43
  // approach in order to keep us cognizant of exactly where a cluster is
43
44
  // being formed.
44
45
  //
45
46
  const yaml = YAML.safeLoad( fs.readFileSync( 'overwhelm.yaml', 'utf-8' ) )
46
47
  const over = yaml.default
47
- const cfgs = yaml[context]
48
+ let cfgs = yaml[context]
49
+ let wtfs = cfgs
50
+
51
+ // If we just need to check context return 0 if cfgs exists, else error.
52
+ if ( args.checkctx ) { process.exit( !cfgs ) }
48
53
 
49
54
  if ( !cfgs ) {
50
55
  console.log( `***ERROR: Unknown context => [${context}]\n` )
@@ -56,6 +61,17 @@ if ( !cfgs ) {
56
61
  process.exit( 1 )
57
62
  }
58
63
 
64
+ // Check to see if we are deriving from another configuration.
65
+ if ( cfgs['PROJECT_BASE'] ) {
66
+ const baseName = cfgs['PROJECT_BASE']
67
+ const tempCfgs = cfgs
68
+ cfgs = yaml[baseName]
69
+ Object.keys( tempCfgs ).forEach( ( key ) => { cfgs[key] = tempCfgs[key] } )
70
+ console.log( "PROJECT_BASE still under evaluation" )
71
+ console.log( "\n cfgs=", cfgs )
72
+ process.exit( 1 ) //XXX HERE
73
+ }
74
+
59
75
  Object.keys( cfgs ).forEach( ( key ) => { over[key] = cfgs[key] || over[key] } )
60
76
 
61
77
  // Expand any variables that reference other variable settings. A perfect
@@ -232,7 +248,7 @@ ahoy.forEach( ( dir ) => {
232
248
 
233
249
  // Set the GCP context for safety!
234
250
  const clusterName = over['CLUSTER_NAME']
235
- const projectName = over['PROJECT_NAME']
251
+ const projectId = over['PROJECT_ID']
236
252
  const zone = over['GCE_REGION'] + ( over['GCE_ZONE'] ? `-${over['GCE_ZONE']}` : '' )
237
253
 
238
254
  if ( !clusterName ) {
@@ -248,7 +264,7 @@ ahoy.forEach( ( dir ) => {
248
264
  ${chalk.bold.green( `CLUSTER_NAME : "\${PROJECT_NAME}"` )}
249
265
 
250
266
  However, if the CLUSTER_NAME is not the same as the PROJECT_NAME then go
251
- ahead and add the CLUSTER_NAME setting to the ${chalk.bold.green(projectName)} section of the
267
+ ahead and add the CLUSTER_NAME setting to the ${chalk.bold.green(projectId)} section of the
252
268
  overwhelm.yaml file.
253
269
 
254
270
  ` ) )
@@ -262,9 +278,9 @@ ahoy.forEach( ( dir ) => {
262
278
  } catch (err) { }
263
279
 
264
280
  const currentCtx = kubeout.toString().trim()
265
- const desiredCtx = `gke_${projectName}_${zone}_${clusterName}`
281
+ const desiredCtx = `gke_${projectId}_${zone}_${clusterName}`
266
282
  const matchedCtx = ( currentCtx === desiredCtx )
267
- const cmd = `gcloud container clusters get-credentials ${clusterName} --zone ${zone} --project ${projectName}`
283
+ const cmd = `gcloud container clusters get-credentials ${clusterName} --zone ${zone} --project ${projectId}`
268
284
 
269
285
  if ( matchedCtx ) {
270
286
  console.log( `
@@ -278,7 +294,7 @@ ahoy.forEach( ( dir ) => {
278
294
 
279
295
  You are about to change your GCP context to:
280
296
  CLUSTER_NAME => ${chalk.bold.green(clusterName)}
281
- PROJECT_NAME => ${chalk.bold.green(projectName)}
297
+ PROJECT_ID => ${chalk.bold.green(projectId)}
282
298
  GCE_REGION => ${chalk.bold.green(zone)}
283
299
 
284
300
  ` )
@@ -16,4 +16,7 @@ function arrayContainsArray(superset, subset) {
16
16
  });
17
17
  }
18
18
 
19
- arrayContainsArray(mdFiles, filesToCheck) ? console.log('README and LICENSE files exist') : process.exit(1);
19
+ if (!arrayContainsArray(mdFiles, filesToCheck)) {
20
+ console.log('Cannot find README.md or LICENSE.md');
21
+ process.exit(1);
22
+ }
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
 
4
+ require("core-js/modules/es7.object.get-own-property-descriptors");
5
+
4
6
  require("core-js/modules/es6.symbol");
5
7
 
6
8
  require("core-js/modules/web.dom.iterable");
@@ -15,7 +17,9 @@ require("core-js/modules/es6.promise");
15
17
 
16
18
  require("core-js/modules/es6.object.to-string");
17
19
 
18
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
20
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
21
+
22
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
19
23
 
20
24
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
25
 
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es7.object.get-own-property-descriptors");
4
+
3
5
  require("core-js/modules/es6.symbol");
4
6
 
5
7
  require("core-js/modules/es6.regexp.split");
@@ -32,7 +34,9 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
32
34
 
33
35
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
34
36
 
35
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
37
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
38
+
39
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
36
40
 
37
41
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
38
42
 
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
 
4
+ require("core-js/modules/es7.object.get-own-property-descriptors");
5
+
4
6
  require("core-js/modules/es6.symbol");
5
7
 
6
8
  require("core-js/modules/web.dom.iterable");
@@ -15,7 +17,9 @@ require("core-js/modules/es6.promise");
15
17
 
16
18
  require("core-js/modules/es6.object.to-string");
17
19
 
18
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
20
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
21
+
22
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
19
23
 
20
24
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
25
 
@@ -16,4 +16,7 @@ function arrayContainsArray(superset, subset) {
16
16
  });
17
17
  }
18
18
 
19
- arrayContainsArray(mdFiles, filesToCheck) ? console.log('README and LICENSE files exist') : process.exit(1);
19
+ if (!arrayContainsArray(mdFiles, filesToCheck)) {
20
+ console.log('Cannot find README.md or LICENSE.md');
21
+ process.exit(1);
22
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "1.8.4",
3
+ "version": "1.10.0",
4
4
  "description": "A package for development build tools.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -13,7 +13,6 @@
13
13
  "test": "echo \"Error: no test specified\" && exit 1"
14
14
  },
15
15
  "bin": {
16
- "auditate": "lib/server/auditate/index.js",
17
16
  "circleate": "src/circleate",
18
17
  "decrypt-secrets": "src/decrypt-secrets",
19
18
  "dockreate": "src/dockreate",
@@ -32,7 +31,7 @@
32
31
  "author": "Leverege Devs",
33
32
  "license": "SEE LICENSE IN LICENSE.md",
34
33
  "dependencies": {
35
- "@google-cloud/kms": "^1.3.0",
34
+ "@google-cloud/kms": "^1.3.1",
36
35
  "async": "^2.6.2",
37
36
  "chalk": "^2.4.2",
38
37
  "cloudflare": "^2.4.1",
@@ -40,19 +39,9 @@
40
39
  "command-line-usage": "^5.0.5",
41
40
  "commander": "^2.20.0",
42
41
  "fs-extra": "^8.1.0",
43
- "get-stdin": "^7.0.0",
44
42
  "git-branch": "^2.0.1",
45
43
  "glob": "^7.1.4",
46
44
  "js-yaml": "^3.13.1",
47
- "lodash.countby": "^4.6.0",
48
- "lodash.first": "^3.0.0",
49
- "lodash.groupby": "^4.6.0",
50
- "lodash.keyby": "^4.6.0",
51
- "lodash.map": "^4.6.0",
52
- "lodash.orderby": "^4.6.0",
53
- "minimist": "^1.2.0",
54
- "npm-audit-helper": "^2.3.18",
55
- "npm-audit-report": "^1.3.2",
56
45
  "ora": "^3.4.0",
57
46
  "parse-gitignore": "^1.0.1",
58
47
  "readline-sync": "^1.4.9",
@@ -68,7 +57,7 @@
68
57
  "@babel/plugin-proposal-optional-chaining": "^7.2.0",
69
58
  "@babel/preset-env": "^7.5.4",
70
59
  "@babel/register": "^7.4.4",
71
- "@leverege/eslint-config-leverege": "^1.4.0",
72
- "core-js": "^3.1.4"
60
+ "@leverege/eslint-config-leverege": "^1.5.3",
61
+ "core-js": "^3.2.1"
73
62
  }
74
63
  }
package/src/circleate CHANGED
@@ -119,7 +119,9 @@ jobs:
119
119
 
120
120
  - run:
121
121
  name: Check for vulnerabilities
122
- command: npm run vuln
122
+ command: |
123
+ sudo npm install -g npm@latest
124
+ npm audit --production
123
125
 
124
126
  - run:
125
127
  name: Check for LICENSE and README files
@@ -301,7 +303,9 @@ jobs:
301
303
 
302
304
  - run:
303
305
  name: Check for vulnerabilities
304
- command: npm run vuln
306
+ command: |
307
+ sudo npm install -g npm@latest
308
+ npm audit --production
305
309
 
306
310
  - run:
307
311
  name: Check for LICENSE and README files
File without changes
package/src/helmdn CHANGED
@@ -77,6 +77,11 @@ function doNuking() {
77
77
  doNuking "${PLATFORM[@]}" && exit $?
78
78
  fi
79
79
 
80
+ if [ "$SERVICE" == "system" ];
81
+ then
82
+ doNuking "${SYSTEM[@]}" && exit $?
83
+ fi
84
+
80
85
  if [ "$SERVICE" == "ingress" ];
81
86
  then
82
87
  clearlyWarn