@docupace/pipeline 1.0.77-alpha.3 → 1.0.77

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 (69) 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/bitbucket-pipelines.yml +59 -59
  6. package/eslint.config.js +49 -49
  7. package/jest.config.js +15 -15
  8. package/next/changeset.sh +75 -75
  9. package/next/copy.sh +34 -34
  10. package/next/deploy.sh +40 -40
  11. package/next/execute.sh +123 -123
  12. package/next/sonar.sh +23 -23
  13. package/package.json +1 -1
  14. package/src/auth0/alias.js +79 -79
  15. package/src/auth0/alias.test.js +172 -172
  16. package/src/auth0/cli.js +82 -82
  17. package/src/auth0/configure.js +902 -902
  18. package/src/auth0/configure.test.js +167 -167
  19. package/src/auth0/export.js +48 -48
  20. package/src/auth0/export.test.js +103 -103
  21. package/src/auth0/metadata.js +141 -141
  22. package/src/auth0/metadata.test.js +186 -186
  23. package/src/auth0/vault.js +60 -60
  24. package/src/auth0/vault.test.js +134 -134
  25. package/src/changeset/changelog-wiki.js +328 -328
  26. package/src/changeset/changeset-config.js +34 -34
  27. package/src/changeset/cli.js +237 -237
  28. package/src/changeset/create.js +215 -215
  29. package/src/changeset/package-util.js +87 -87
  30. package/src/changeset/util.js +43 -43
  31. package/src/changeset/validate.js +91 -91
  32. package/src/changeset/version.js +102 -102
  33. package/src/jenkins/setParams.groovy +58 -58
  34. package/src/lib/merge-driver.js +204 -204
  35. package/src/merge/cli-merge-all.js +507 -507
  36. package/src/merge/cli-merge.js +492 -492
  37. package/src/merge/cli-resolve.js +399 -399
  38. package/src/merge/cli.js +38 -38
  39. package/src/merge/merge-changelog.js +87 -87
  40. package/src/merge/merge-package.js +106 -106
  41. package/src/merge/merge-types.js +82 -82
  42. package/src/merge/pr.js +231 -231
  43. package/src/micro/cli.js +71 -0
  44. package/src/micro/ms-deploy.js +271 -0
  45. package/src/micro/{publish-ms.js → ms-publish.js} +6 -8
  46. package/src/next/alias.js +53 -53
  47. package/src/next/apache.js +81 -81
  48. package/src/next/cli.js +1 -10
  49. package/src/next/config.js +137 -137
  50. package/src/next/connect.js +226 -226
  51. package/src/next/copy.js +61 -61
  52. package/src/next/deploy.js +633 -633
  53. package/src/next/git-to-semver.js +79 -79
  54. package/src/next/haproxy.js +76 -76
  55. package/src/next/jenkins.js +123 -123
  56. package/src/next/jira.js +84 -84
  57. package/src/next/logger.js +17 -17
  58. package/src/next/pipline.js +114 -114
  59. package/src/next/publish.js +71 -71
  60. package/src/next/pull.js +7 -7
  61. package/src/next/sonar.js +23 -23
  62. package/src/next/test.js +5 -5
  63. package/src/next/util.js +93 -95
  64. package/src/next/vault.js +45 -45
  65. package/terraform/apply.sh +37 -37
  66. package/terraform/init.sh +72 -72
  67. package/terraform/plan.sh +76 -76
  68. package/terraform/validate.sh +17 -17
  69. package/src/micro/deploy-microservice.js +0 -153
@@ -1,137 +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: () => 'www.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: () => 'www.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
- };
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: () => 'www.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: () => 'www.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
+ };