@leverege/build-tools 2.7.0 → 2.8.1
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/overwhelm.js +23 -5
- package/lib/server/repo-init/config.tgz +0 -0
- package/lib/web/overwhelm.js +23 -5
- package/package.json +7 -8
- package/src/overwhelm.js +21 -2
package/lib/server/overwhelm.js
CHANGED
|
@@ -68,8 +68,9 @@ const optionsDefinitions = [
|
|
|
68
68
|
];
|
|
69
69
|
const args = cliArgs(optionsDefinitions); // The kubernetes context is equal to the git branch name.
|
|
70
70
|
|
|
71
|
-
const gitBranch =
|
|
72
|
-
|
|
71
|
+
const gitBranch = exec('git rev-parse --abbrev-ref HEAD', {
|
|
72
|
+
stdio: [undefined]
|
|
73
|
+
}).toString().trim();
|
|
73
74
|
const context = args.context || gitBranch;
|
|
74
75
|
|
|
75
76
|
if (context === 'master') {
|
|
@@ -271,8 +272,24 @@ ahoy.forEach(dir => {
|
|
|
271
272
|
});
|
|
272
273
|
}
|
|
273
274
|
|
|
274
|
-
valuesOut += `\n${values}`;
|
|
275
|
-
|
|
275
|
+
valuesOut += `\n${values}`; // Augment the default service section of the YAML with settings that
|
|
276
|
+
// usually come from the top level overwhelm.yaml file.
|
|
277
|
+
//
|
|
278
|
+
|
|
279
|
+
const valuesAll = YAML.load(valuesOut);
|
|
280
|
+
const valuesSvc = {
|
|
281
|
+
service: {
|
|
282
|
+
PROJECT_ID: 'OVH:<PROJECT_ID>',
|
|
283
|
+
PROJECT_NAME: 'OVH:<PROJECT_NAME>',
|
|
284
|
+
HOST: 'OVH:<HOST>',
|
|
285
|
+
INGRESS: 'OVH:<INGRESS>'
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
const valuesMerged = YAML.dump(deepmerge(valuesSvc, valuesAll), {
|
|
289
|
+
quotingType: '"'
|
|
290
|
+
});
|
|
291
|
+
valuesOut = doReplacements(valuesMerged, over); // DEPRECATED once siren and manheim are platform 4.0
|
|
292
|
+
// If we are going to override then we need to convert it to YAML and
|
|
276
293
|
// do a deepmerge to combine the values.
|
|
277
294
|
|
|
278
295
|
const valuesOverride = `${dir}/values-override.yaml`;
|
|
@@ -286,7 +303,8 @@ ahoy.forEach(dir => {
|
|
|
286
303
|
valuesOut = YAML.dump(deepmerge(allValues, overrides), {
|
|
287
304
|
quotingType: '"'
|
|
288
305
|
});
|
|
289
|
-
}
|
|
306
|
+
} // DEPRECATED
|
|
307
|
+
|
|
290
308
|
|
|
291
309
|
fs.writeFileSync(`${dir}/values.yaml`, valuesOut);
|
|
292
310
|
}
|
|
Binary file
|
package/lib/web/overwhelm.js
CHANGED
|
@@ -68,8 +68,9 @@ const optionsDefinitions = [
|
|
|
68
68
|
];
|
|
69
69
|
const args = cliArgs(optionsDefinitions); // The kubernetes context is equal to the git branch name.
|
|
70
70
|
|
|
71
|
-
const gitBranch =
|
|
72
|
-
|
|
71
|
+
const gitBranch = exec('git rev-parse --abbrev-ref HEAD', {
|
|
72
|
+
stdio: [undefined]
|
|
73
|
+
}).toString().trim();
|
|
73
74
|
const context = args.context || gitBranch;
|
|
74
75
|
|
|
75
76
|
if (context === 'master') {
|
|
@@ -271,8 +272,24 @@ ahoy.forEach(dir => {
|
|
|
271
272
|
});
|
|
272
273
|
}
|
|
273
274
|
|
|
274
|
-
valuesOut += `\n${values}`;
|
|
275
|
-
|
|
275
|
+
valuesOut += `\n${values}`; // Augment the default service section of the YAML with settings that
|
|
276
|
+
// usually come from the top level overwhelm.yaml file.
|
|
277
|
+
//
|
|
278
|
+
|
|
279
|
+
const valuesAll = YAML.load(valuesOut);
|
|
280
|
+
const valuesSvc = {
|
|
281
|
+
service: {
|
|
282
|
+
PROJECT_ID: 'OVH:<PROJECT_ID>',
|
|
283
|
+
PROJECT_NAME: 'OVH:<PROJECT_NAME>',
|
|
284
|
+
HOST: 'OVH:<HOST>',
|
|
285
|
+
INGRESS: 'OVH:<INGRESS>'
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
const valuesMerged = YAML.dump(deepmerge(valuesSvc, valuesAll), {
|
|
289
|
+
quotingType: '"'
|
|
290
|
+
});
|
|
291
|
+
valuesOut = doReplacements(valuesMerged, over); // DEPRECATED once siren and manheim are platform 4.0
|
|
292
|
+
// If we are going to override then we need to convert it to YAML and
|
|
276
293
|
// do a deepmerge to combine the values.
|
|
277
294
|
|
|
278
295
|
const valuesOverride = `${dir}/values-override.yaml`;
|
|
@@ -286,7 +303,8 @@ ahoy.forEach(dir => {
|
|
|
286
303
|
valuesOut = YAML.dump(deepmerge(allValues, overrides), {
|
|
287
304
|
quotingType: '"'
|
|
288
305
|
});
|
|
289
|
-
}
|
|
306
|
+
} // DEPRECATED
|
|
307
|
+
|
|
290
308
|
|
|
291
309
|
fs.writeFileSync(`${dir}/values.yaml`, valuesOut);
|
|
292
310
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leverege/build-tools",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"description": "A collection of build / support tools for Leverege developers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -60,26 +60,25 @@
|
|
|
60
60
|
"dotenv": "^10.0.0",
|
|
61
61
|
"execa": "^5.1.1",
|
|
62
62
|
"figlet": "^1.5.2",
|
|
63
|
-
"git-branch": "^2.0.1",
|
|
64
63
|
"glob": "^7.2.0",
|
|
65
|
-
"inquirer": "^8.
|
|
64
|
+
"inquirer": "^8.2.0",
|
|
66
65
|
"js-yaml": "^4.1.0",
|
|
67
66
|
"ncp": "^2.0.0",
|
|
68
67
|
"npm-check-updates": "^11.8.5",
|
|
69
68
|
"npm-registry-fetch": "^11.0.0",
|
|
70
|
-
"open": "^8.
|
|
69
|
+
"open": "^8.3.0",
|
|
71
70
|
"ora": "^5.4.1",
|
|
72
71
|
"parse-gitignore": "^1.0.1",
|
|
73
72
|
"readline-sync": "^1.4.10",
|
|
74
73
|
"semver": "^7.3.5",
|
|
75
|
-
"simple-git": "^2.
|
|
74
|
+
"simple-git": "^2.46.0"
|
|
76
75
|
},
|
|
77
76
|
"devDependencies": {
|
|
78
77
|
"@babel/cli": "^7.15.7",
|
|
79
|
-
"@babel/core": "^7.15.
|
|
80
|
-
"@babel/node": "^7.15.
|
|
78
|
+
"@babel/core": "^7.15.8",
|
|
79
|
+
"@babel/node": "^7.15.8",
|
|
81
80
|
"@leverege/babel-preset-leverege-node": "^2.0.0",
|
|
82
81
|
"@leverege/eslint-config-leverege": "^3.0.1",
|
|
83
|
-
"npm": "^7.24.
|
|
82
|
+
"npm": "^7.24.2"
|
|
84
83
|
}
|
|
85
84
|
}
|
package/src/overwhelm.js
CHANGED
|
@@ -28,7 +28,9 @@ const optionsDefinitions = [
|
|
|
28
28
|
const args = cliArgs( optionsDefinitions )
|
|
29
29
|
|
|
30
30
|
// The kubernetes context is equal to the git branch name.
|
|
31
|
-
const gitBranch =
|
|
31
|
+
const gitBranch = exec(
|
|
32
|
+
'git rev-parse --abbrev-ref HEAD', { stdio : [ undefined ] }
|
|
33
|
+
).toString().trim()
|
|
32
34
|
|
|
33
35
|
const context = args.context || gitBranch
|
|
34
36
|
|
|
@@ -224,8 +226,24 @@ ahoy.forEach( ( dir ) => {
|
|
|
224
226
|
valuesOut += fs.readFileSync( valuesLocal, { encoding : 'utf-8' } )
|
|
225
227
|
}
|
|
226
228
|
valuesOut += `\n${values}`
|
|
227
|
-
valuesOut = doReplacements( valuesOut, over )
|
|
228
229
|
|
|
230
|
+
// Augment the default service section of the YAML with settings that
|
|
231
|
+
// usually come from the top level overwhelm.yaml file.
|
|
232
|
+
//
|
|
233
|
+
const valuesAll = YAML.load( valuesOut )
|
|
234
|
+
const valuesSvc = {
|
|
235
|
+
service : {
|
|
236
|
+
PROJECT_ID : 'OVH:<PROJECT_ID>',
|
|
237
|
+
PROJECT_NAME : 'OVH:<PROJECT_NAME>',
|
|
238
|
+
HOST : 'OVH:<HOST>',
|
|
239
|
+
INGRESS : 'OVH:<INGRESS>',
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
const valuesMerged = YAML.dump( deepmerge( valuesSvc, valuesAll ), { quotingType : '"' } )
|
|
243
|
+
|
|
244
|
+
valuesOut = doReplacements( valuesMerged, over )
|
|
245
|
+
|
|
246
|
+
// DEPRECATED once siren and manheim are platform 4.0
|
|
229
247
|
// If we are going to override then we need to convert it to YAML and
|
|
230
248
|
// do a deepmerge to combine the values.
|
|
231
249
|
const valuesOverride = `${dir}/values-override.yaml`
|
|
@@ -236,6 +254,7 @@ ahoy.forEach( ( dir ) => {
|
|
|
236
254
|
const allValues = YAML.load( valuesOut )
|
|
237
255
|
valuesOut = YAML.dump( deepmerge( allValues, overrides ), { quotingType : '"' } )
|
|
238
256
|
}
|
|
257
|
+
// DEPRECATED
|
|
239
258
|
|
|
240
259
|
fs.writeFileSync( `${dir}/values.yaml`, valuesOut )
|
|
241
260
|
}
|