@docupace/pipeline 1.0.124 → 1.0.127
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 +12 -0
- package/src/next/deploy.js +12 -2
package/package.json
CHANGED
package/src/next/config.js
CHANGED
|
@@ -107,6 +107,18 @@ export const appInfo = {
|
|
|
107
107
|
},
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
+
// Standalone apps (own repo, own image, plain-tag revision) don't need a bespoke
|
|
111
|
+
// appInfo entry: deploy-app runs from the app's own repo, so BITBUCKET_REPO_SLUG
|
|
112
|
+
// (set by Bitbucket Pipelines) already names both the repo and the image by convention.
|
|
113
|
+
export const getDefaultAppInfo = (application) => {
|
|
114
|
+
const name = application;
|
|
115
|
+
return {
|
|
116
|
+
repositoryName: name,
|
|
117
|
+
imageName: name,
|
|
118
|
+
deployAttributes: ['image.tag'],
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
|
|
110
122
|
export const getEnvInfo = () => {
|
|
111
123
|
const envInfo = Object.fromEntries(
|
|
112
124
|
environments.map((env) => [
|
package/src/next/deploy.js
CHANGED
|
@@ -5,7 +5,12 @@ import lodash from 'lodash';
|
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import semver from 'semver';
|
|
7
7
|
import { $ } from 'zx';
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
appInfo,
|
|
10
|
+
environmentConfig,
|
|
11
|
+
getDefaultAppInfo,
|
|
12
|
+
getRepUrl,
|
|
13
|
+
} from './config.js';
|
|
9
14
|
import { copy2 } from './copy.js';
|
|
10
15
|
import { gitDescribeToSemver } from './git-to-semver.js';
|
|
11
16
|
import { deployConnect, deployCore } from './jenkins.js';
|
|
@@ -393,7 +398,12 @@ export async function deployTemplate(
|
|
|
393
398
|
export async function deployAppWithTag(application, env, site, deployTag) {
|
|
394
399
|
console.log(`Deploying application: ${application} for site: ${site}`);
|
|
395
400
|
console.log(`Using deployment tag: ${deployTag}`);
|
|
396
|
-
const appDetails = appInfo[application];
|
|
401
|
+
const appDetails = appInfo[application] ?? getDefaultAppInfo(application);
|
|
402
|
+
if (!appInfo[application]) {
|
|
403
|
+
console.log(
|
|
404
|
+
`No appInfo entry for "${application}"; using default naming convention: repositoryName/imageName = "${appDetails.repositoryName}".`,
|
|
405
|
+
);
|
|
406
|
+
}
|
|
397
407
|
|
|
398
408
|
const repoPath = await cloneEnvRepository(env);
|
|
399
409
|
const { deployConfigFilePath: valuesFilePath } = getConfigPath(
|