forked from bcgov/hets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
46 lines (43 loc) · 1.12 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"use strict";
const options = require("@bcgov/pipeline-cli").Util.parseArguments();
const changeId = options.pr; //aka pull-request
const version = "1.0.0";
const name = "jenkins";
const phases = {
build: {
namespace: "e0cee6-tools",
name: `${name}`,
phase: "build",
changeId: changeId,
suffix: `-build-${changeId}`,
instance: `${name}-build-${changeId}`,
version: `${version}-${changeId}`,
tag: `build-${version}-${changeId}`,
},
dev: {
namespace: "e0cee6-tools",
name: `${name}`,
phase: "dev",
changeId: changeId,
suffix: `-dev-${changeId}`,
instance: `${name}-dev-${changeId}`,
version: `${version}-${changeId}`,
tag: `dev-${version}-${changeId}`,
},
prod: {
namespace: "e0cee6-tools",
name: `${name}`,
phase: "prod",
changeId: changeId,
suffix: `-prod`,
instance: `${name}-prod`,
version: `${version}`,
tag: `prod-${version}`,
},
};
// This callback forces the node process to exit as failure.
process.on("unhandledRejection", (reason) => {
console.log(reason);
process.exit(1);
});
module.exports = exports = { phases, options };