@docupace/pipeline 1.0.53 → 1.0.55

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.
Files changed (44) hide show
  1. package/.prettierrc.cjs +12 -12
  2. package/README.md +135 -135
  3. package/bin/azuread_update_callbacks_for_app.sh +58 -58
  4. package/bin/next-changeset-validate.sh +8 -8
  5. package/eslint.config.js +26 -26
  6. package/next/changeset.sh +75 -75
  7. package/next/copy.sh +34 -34
  8. package/next/deploy.sh +40 -40
  9. package/next/execute.sh +123 -123
  10. package/next/sonar.sh +23 -23
  11. package/package.json +50 -50
  12. package/src/auth0/alias.js +72 -72
  13. package/src/auth0/cli.js +0 -0
  14. package/src/auth0/export.js +43 -43
  15. package/src/auth0/metadata.js +132 -132
  16. package/src/auth0/vault.js +107 -107
  17. package/src/changeset/changeset-config.js +34 -34
  18. package/src/changeset/cli.js +200 -200
  19. package/src/changeset/create.js +205 -205
  20. package/src/changeset/package-util.js +86 -86
  21. package/src/changeset/util.js +43 -43
  22. package/src/changeset/validate.js +84 -84
  23. package/src/changeset/version.js +102 -102
  24. package/src/jenkins/setParams.groovy +58 -58
  25. package/src/next/alias.js +53 -53
  26. package/src/next/apache.js +81 -73
  27. package/src/next/cli.js +228 -228
  28. package/src/next/config.js +137 -136
  29. package/src/next/connect.js +227 -227
  30. package/src/next/copy.js +61 -61
  31. package/src/next/deploy.js +595 -583
  32. package/src/next/haproxy.js +71 -71
  33. package/src/next/jira.js +84 -84
  34. package/src/next/logger.js +17 -17
  35. package/src/next/pipline.js +114 -114
  36. package/src/next/publish.js +71 -71
  37. package/src/next/pull.js +7 -7
  38. package/src/next/sonar.js +23 -23
  39. package/src/next/util.js +93 -93
  40. package/src/next/vault.js +45 -45
  41. package/terraform/apply.sh +37 -37
  42. package/terraform/init.sh +72 -72
  43. package/terraform/plan.sh +76 -76
  44. package/terraform/validate.sh +17 -17
@@ -1,136 +1,137 @@
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
- };
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}.stage.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
+ stage: 'staging',
134
+ uat: 'uat',
135
+ prd: 'prod',
136
+ prod: 'prod',
137
+ };