@docupace/pipeline 1.0.39-matttest.42 → 1.0.39-matttest.43
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/package.json +1 -1
- package/src/next/config.js +19 -1
- package/src/next/deploy.js +10 -2
package/package.json
CHANGED
package/src/next/config.js
CHANGED
|
@@ -35,17 +35,35 @@ export const environmentConfig = {
|
|
|
35
35
|
export const appInfo = {
|
|
36
36
|
'graphql-server': {
|
|
37
37
|
repositoryName: 'docupace-graphql-server',
|
|
38
|
-
imageName: 'docupace-graphql-
|
|
38
|
+
imageName: 'docupace-graphql-server',
|
|
39
39
|
deployAttributes: [
|
|
40
40
|
'image.tag',
|
|
41
41
|
'graphqlServer.siteConfigRemoteBranch',
|
|
42
42
|
'graphqlServer.standardConfigRemoteBranch',
|
|
43
43
|
],
|
|
44
44
|
},
|
|
45
|
+
cc: {
|
|
46
|
+
repositoryName: 'docupace-ui-main',
|
|
47
|
+
imageName: 'cc-ui-app',
|
|
48
|
+
deployAttributes: ['image.tag'],
|
|
49
|
+
getAppRevision: (config) => {
|
|
50
|
+
const version = config.image.tag.slice(1);
|
|
51
|
+
return 'cc-ui-app@' + version;
|
|
52
|
+
},
|
|
53
|
+
},
|
|
45
54
|
ui: {
|
|
46
55
|
repositoryName: 'docupace-ui-main',
|
|
47
56
|
imageName: 'enterprise-ui-app',
|
|
48
57
|
deployAttributes: ['image.tag'],
|
|
58
|
+
getAppRevision: (config) => {
|
|
59
|
+
const tag = config.image.tag;
|
|
60
|
+
const version = tag.startsWith('v') ? tag.slice(1) : tag;
|
|
61
|
+
if (semver.gt(version, UI_MONO_VERSION)) {
|
|
62
|
+
return 'enterprise-ui-app@' + version;
|
|
63
|
+
} else {
|
|
64
|
+
return tag;
|
|
65
|
+
}
|
|
66
|
+
},
|
|
49
67
|
updateConfigFunction: (config) => {
|
|
50
68
|
if (config.image.repository.endsWith('/docupace-ui-main')) {
|
|
51
69
|
const tag = config.image.tag;
|
package/src/next/deploy.js
CHANGED
|
@@ -303,7 +303,13 @@ export async function deployAppWithTag(application, env, site, deployTag) {
|
|
|
303
303
|
|
|
304
304
|
if (env !== 'dev') {
|
|
305
305
|
const appDetails = appInfo[application];
|
|
306
|
-
await copy2(
|
|
306
|
+
await copy2(
|
|
307
|
+
appDetails.repositoryName,
|
|
308
|
+
'dev',
|
|
309
|
+
env,
|
|
310
|
+
deployTag,
|
|
311
|
+
appDetails.imageName,
|
|
312
|
+
);
|
|
307
313
|
}
|
|
308
314
|
|
|
309
315
|
const { repoPath, deployConfigFilePath, deployConfig } =
|
|
@@ -419,7 +425,9 @@ export async function deployApp(
|
|
|
419
425
|
deployConfigFilePath: toDeployAppConfigFilePath,
|
|
420
426
|
} = await readDeployConfig(application, toEnv, toSite, 'app');
|
|
421
427
|
|
|
422
|
-
toDeployAppConfig.revision =
|
|
428
|
+
toDeployAppConfig.revision = appDetails.getAppRevision
|
|
429
|
+
? appDetails.getAppRevision(fromDeployConfig)
|
|
430
|
+
: fromDeployConfig.image.tag;
|
|
423
431
|
|
|
424
432
|
// Write updated configuration to the target YAML file
|
|
425
433
|
writeDeployConfig(toDeployConfigFilePath, toDeployConfig);
|