@docupace/pipeline 1.0.48 → 1.0.50
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/.prettierrc.cjs +12 -12
- package/README.md +135 -135
- package/bin/azuread_update_callbacks_for_app.sh +58 -58
- package/bin/next-changeset-validate.sh +8 -8
- package/next/changeset.sh +75 -75
- package/next/copy.sh +34 -34
- package/next/deploy.sh +40 -40
- package/next/execute.sh +123 -123
- package/next/sonar.sh +23 -23
- package/package.json +1 -1
- package/src/auth0/alias.js +72 -72
- package/src/auth0/configure.js +783 -783
- package/src/auth0/export.js +43 -43
- package/src/auth0/metadata.js +132 -132
- package/src/auth0/vault.js +107 -107
- package/src/changeset/changeset-config.js +34 -34
- package/src/changeset/cli.js +188 -188
- package/src/changeset/create.js +205 -205
- package/src/changeset/package-util.js +86 -86
- package/src/changeset/util.js +43 -43
- package/src/changeset/validate.js +84 -84
- package/src/changeset/version.js +95 -95
- package/src/jenkins/setParams.groovy +58 -58
- package/src/next/alias.js +53 -53
- package/src/next/apache.js +73 -73
- package/src/next/cli.js +220 -220
- package/src/next/config.js +136 -136
- package/src/next/connect.js +227 -227
- package/src/next/copy.js +61 -61
- package/src/next/deploy.js +553 -553
- package/src/next/haproxy.js +71 -71
- package/src/next/jira.js +80 -80
- package/src/next/logger.js +17 -17
- package/src/next/pipline.js +114 -114
- package/src/next/publish.js +71 -71
- package/src/next/pull.js +7 -7
- package/src/next/sonar.js +23 -23
- package/src/next/util.js +93 -93
- package/src/next/vault.js +45 -45
- package/terraform/apply.sh +37 -37
- package/terraform/init.sh +72 -72
- package/terraform/plan.sh +76 -76
- package/terraform/validate.sh +17 -17
package/src/next/config.js
CHANGED
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
import semver from 'semver';
|
|
2
|
-
|
|
3
|
-
export const environments = ['dev', 'qa', 'uat', 'stage', 'prod'];
|
|
4
|
-
|
|
5
|
-
const UI_MONO_VERSION = '1.4.0-alpha.0';
|
|
6
|
-
|
|
7
|
-
export const environmentConfig = {
|
|
8
|
-
dev: {
|
|
9
|
-
newUrl: (site) => `https://${site}.dev.dpai.tech`,
|
|
10
|
-
oldUrl: (site) => `https://www.dev.docupaceinc.com/${site}`,
|
|
11
|
-
docupaceHost: () => 'www.dev.docupaceinc.com',
|
|
12
|
-
ccUrl: (site) => `https://${site}-cc.dev.dpai.tech`,
|
|
13
|
-
},
|
|
14
|
-
qa: {
|
|
15
|
-
newUrl: (site) => `https://${site}.qa.dpai.tech`,
|
|
16
|
-
oldUrl: (site) => `https://www.preprod.docupaceinc.com/${site}`,
|
|
17
|
-
docupaceHost: () => 'www.preprod.docupaceinc.com',
|
|
18
|
-
ccUrl: (site) => `https://${site}-cc.qa.dpai.tech`,
|
|
19
|
-
},
|
|
20
|
-
uat: {
|
|
21
|
-
newUrl: (site) => `https://${site}.uat.dpai.tech`,
|
|
22
|
-
oldUrl: (site) => `https://
|
|
23
|
-
docupaceHost: () => '
|
|
24
|
-
ccUrl: (site) => `https://${site}-cc.uat.dpai.tech`,
|
|
25
|
-
},
|
|
26
|
-
stage: {
|
|
27
|
-
newUrl: (site) => `https://${site}.stg.dpai.tech`,
|
|
28
|
-
oldUrl: (site) => `https://
|
|
29
|
-
docupaceHost: () => '
|
|
30
|
-
ccUrl: (site) => `https://${site}-cc.
|
|
31
|
-
},
|
|
32
|
-
prod: {
|
|
33
|
-
newUrl: (site) => `https://${site}.dpai.tech`,
|
|
34
|
-
oldUrl: (site) => `https://
|
|
35
|
-
docupaceHost: () => '
|
|
36
|
-
ccUrl: (site) => `https://${site}-cc.dpai.tech`,
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const appInfo = {
|
|
41
|
-
'graphql-server': {
|
|
42
|
-
repositoryName: 'docupace-graphql-server',
|
|
43
|
-
imageName: 'docupace-graphql-server',
|
|
44
|
-
deployAttributes: [
|
|
45
|
-
'image.tag',
|
|
46
|
-
'graphqlServer.siteConfigRemoteBranch',
|
|
47
|
-
'graphqlServer.standardConfigRemoteBranch',
|
|
48
|
-
],
|
|
49
|
-
},
|
|
50
|
-
cc: {
|
|
51
|
-
repositoryName: 'docupace-ui-main',
|
|
52
|
-
imageName: 'cc-ui-app',
|
|
53
|
-
deployAttributes: ['image.tag'],
|
|
54
|
-
getAppRevision: (config) => {
|
|
55
|
-
const version = config.image.tag.slice(1);
|
|
56
|
-
return 'cc-ui-app@' + version;
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
ui: {
|
|
60
|
-
repositoryName: 'docupace-ui-main',
|
|
61
|
-
imageName: 'enterprise-ui-app',
|
|
62
|
-
deployAttributes: ['image.tag'],
|
|
63
|
-
getAppRevision: (config) => {
|
|
64
|
-
const tag = config.image.tag;
|
|
65
|
-
const version = tag.startsWith('v') ? tag.slice(1) : tag;
|
|
66
|
-
if (semver.gt(version, UI_MONO_VERSION)) {
|
|
67
|
-
return 'enterprise-ui-app@' + version;
|
|
68
|
-
} else {
|
|
69
|
-
return tag;
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
updateConfigFunction: (config) => {
|
|
73
|
-
if (config.image.repository.endsWith('/docupace-ui-main')) {
|
|
74
|
-
const tag = config.image.tag;
|
|
75
|
-
const version = tag.startsWith('v') ? tag.slice(1) : tag;
|
|
76
|
-
if (semver.gt(version, UI_MONO_VERSION)) {
|
|
77
|
-
const parts = config.image.repository.split('/');
|
|
78
|
-
parts[2] = 'enterprise-ui-app';
|
|
79
|
-
config.image.repository = parts.join('/');
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return config;
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export const getEnvInfo = () => {
|
|
88
|
-
const envInfo = Object.fromEntries(
|
|
89
|
-
environments.map((env) => [
|
|
90
|
-
env,
|
|
91
|
-
{
|
|
92
|
-
jfrog: {
|
|
93
|
-
username: process.env[`JF_REGISTRY_${env.toUpperCase()}_USERNAME`],
|
|
94
|
-
password: process.env[`JF_REGISTRY_${env.toUpperCase()}_PASSWORD`],
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
]),
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
return envInfo;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
export const getBitbucketInfo = () => {
|
|
104
|
-
return {
|
|
105
|
-
username: process.env.BITBUCKET_USERNAME,
|
|
106
|
-
password: process.env.BITBUCKET_APP_PASSWORD,
|
|
107
|
-
workspace: 'dp-cloud',
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export const getRepUrl = (repoName) => {
|
|
112
|
-
const { username, password, workspace } = getBitbucketInfo();
|
|
113
|
-
return `https://${username}:${password}@bitbucket.org/${workspace}/${repoName}.git`;
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
export const jfRegistryUrl = 'registry.paperout.com';
|
|
117
|
-
|
|
118
|
-
export const getVaultSecretsConfigs = (site) => {
|
|
119
|
-
return {
|
|
120
|
-
commonSecretsPath: 'secret/data/common/config',
|
|
121
|
-
siteCommonSecretsPath: `secret/data/${site}/common/config`,
|
|
122
|
-
graphqlServerSecretsPath: `secret/data/${site}/graphql-server/config`,
|
|
123
|
-
uiSecretsPath: `secret/data/${site}/ui/config`,
|
|
124
|
-
ccUISecretsPath: `secret/data/${site}/ui-cc/config`,
|
|
125
|
-
awsSecretsPath: `secret/data/${site}/aws/config`,
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
export const coreSiteEnvMap = {
|
|
130
|
-
dev: 'dev',
|
|
131
|
-
qa: 'preprod',
|
|
132
|
-
stg: 'staging',
|
|
133
|
-
uat: 'uat',
|
|
134
|
-
prd: 'prod',
|
|
135
|
-
prod: 'prod',
|
|
136
|
-
};
|
|
1
|
+
import semver from 'semver';
|
|
2
|
+
|
|
3
|
+
export const environments = ['dev', 'qa', 'uat', 'stage', 'prod'];
|
|
4
|
+
|
|
5
|
+
const UI_MONO_VERSION = '1.4.0-alpha.0';
|
|
6
|
+
|
|
7
|
+
export const environmentConfig = {
|
|
8
|
+
dev: {
|
|
9
|
+
newUrl: (site) => `https://${site}.dev.dpai.tech`,
|
|
10
|
+
oldUrl: (site) => `https://www.dev.docupaceinc.com/${site}`,
|
|
11
|
+
docupaceHost: () => 'www.dev.docupaceinc.com',
|
|
12
|
+
ccUrl: (site) => `https://${site}-cc.dev.dpai.tech`,
|
|
13
|
+
},
|
|
14
|
+
qa: {
|
|
15
|
+
newUrl: (site) => `https://${site}.qa.dpai.tech`,
|
|
16
|
+
oldUrl: (site) => `https://www.preprod.docupaceinc.com/${site}`,
|
|
17
|
+
docupaceHost: () => 'www.preprod.docupaceinc.com',
|
|
18
|
+
ccUrl: (site) => `https://${site}-cc.qa.dpai.tech`,
|
|
19
|
+
},
|
|
20
|
+
uat: {
|
|
21
|
+
newUrl: (site) => `https://${site}.uat.dpai.tech`,
|
|
22
|
+
oldUrl: (site) => `https://uat.paperout.com/${site}`,
|
|
23
|
+
docupaceHost: () => 'uat.paperout.com',
|
|
24
|
+
ccUrl: (site) => `https://${site}-cc.uat.dpai.tech`,
|
|
25
|
+
},
|
|
26
|
+
stage: {
|
|
27
|
+
newUrl: (site) => `https://${site}.stg.dpai.tech`,
|
|
28
|
+
oldUrl: (site) => `https://stage.paperout.com/${site}`,
|
|
29
|
+
docupaceHost: () => 'stage.paperout.com',
|
|
30
|
+
ccUrl: (site) => `https://${site}-cc.stage.dpai.tech`,
|
|
31
|
+
},
|
|
32
|
+
prod: {
|
|
33
|
+
newUrl: (site) => `https://${site}.dpai.tech`,
|
|
34
|
+
oldUrl: (site) => `https://www3.paperout.com/${site}`,
|
|
35
|
+
docupaceHost: () => 'www3.paperout.com',
|
|
36
|
+
ccUrl: (site) => `https://${site}-cc.dpai.tech`,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const appInfo = {
|
|
41
|
+
'graphql-server': {
|
|
42
|
+
repositoryName: 'docupace-graphql-server',
|
|
43
|
+
imageName: 'docupace-graphql-server',
|
|
44
|
+
deployAttributes: [
|
|
45
|
+
'image.tag',
|
|
46
|
+
'graphqlServer.siteConfigRemoteBranch',
|
|
47
|
+
'graphqlServer.standardConfigRemoteBranch',
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
cc: {
|
|
51
|
+
repositoryName: 'docupace-ui-main',
|
|
52
|
+
imageName: 'cc-ui-app',
|
|
53
|
+
deployAttributes: ['image.tag'],
|
|
54
|
+
getAppRevision: (config) => {
|
|
55
|
+
const version = config.image.tag.slice(1);
|
|
56
|
+
return 'cc-ui-app@' + version;
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
ui: {
|
|
60
|
+
repositoryName: 'docupace-ui-main',
|
|
61
|
+
imageName: 'enterprise-ui-app',
|
|
62
|
+
deployAttributes: ['image.tag'],
|
|
63
|
+
getAppRevision: (config) => {
|
|
64
|
+
const tag = config.image.tag;
|
|
65
|
+
const version = tag.startsWith('v') ? tag.slice(1) : tag;
|
|
66
|
+
if (semver.gt(version, UI_MONO_VERSION)) {
|
|
67
|
+
return 'enterprise-ui-app@' + version;
|
|
68
|
+
} else {
|
|
69
|
+
return tag;
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
updateConfigFunction: (config) => {
|
|
73
|
+
if (config.image.repository.endsWith('/docupace-ui-main')) {
|
|
74
|
+
const tag = config.image.tag;
|
|
75
|
+
const version = tag.startsWith('v') ? tag.slice(1) : tag;
|
|
76
|
+
if (semver.gt(version, UI_MONO_VERSION)) {
|
|
77
|
+
const parts = config.image.repository.split('/');
|
|
78
|
+
parts[2] = 'enterprise-ui-app';
|
|
79
|
+
config.image.repository = parts.join('/');
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return config;
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const getEnvInfo = () => {
|
|
88
|
+
const envInfo = Object.fromEntries(
|
|
89
|
+
environments.map((env) => [
|
|
90
|
+
env,
|
|
91
|
+
{
|
|
92
|
+
jfrog: {
|
|
93
|
+
username: process.env[`JF_REGISTRY_${env.toUpperCase()}_USERNAME`],
|
|
94
|
+
password: process.env[`JF_REGISTRY_${env.toUpperCase()}_PASSWORD`],
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
]),
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
return envInfo;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const getBitbucketInfo = () => {
|
|
104
|
+
return {
|
|
105
|
+
username: process.env.BITBUCKET_USERNAME,
|
|
106
|
+
password: process.env.BITBUCKET_APP_PASSWORD,
|
|
107
|
+
workspace: 'dp-cloud',
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export const getRepUrl = (repoName) => {
|
|
112
|
+
const { username, password, workspace } = getBitbucketInfo();
|
|
113
|
+
return `https://${username}:${password}@bitbucket.org/${workspace}/${repoName}.git`;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export const jfRegistryUrl = 'registry.paperout.com';
|
|
117
|
+
|
|
118
|
+
export const getVaultSecretsConfigs = (site) => {
|
|
119
|
+
return {
|
|
120
|
+
commonSecretsPath: 'secret/data/common/config',
|
|
121
|
+
siteCommonSecretsPath: `secret/data/${site}/common/config`,
|
|
122
|
+
graphqlServerSecretsPath: `secret/data/${site}/graphql-server/config`,
|
|
123
|
+
uiSecretsPath: `secret/data/${site}/ui/config`,
|
|
124
|
+
ccUISecretsPath: `secret/data/${site}/ui-cc/config`,
|
|
125
|
+
awsSecretsPath: `secret/data/${site}/aws/config`,
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export const coreSiteEnvMap = {
|
|
130
|
+
dev: 'dev',
|
|
131
|
+
qa: 'preprod',
|
|
132
|
+
stg: 'staging',
|
|
133
|
+
uat: 'uat',
|
|
134
|
+
prd: 'prod',
|
|
135
|
+
prod: 'prod',
|
|
136
|
+
};
|