@docupace/pipeline 1.0.138 → 1.1.1
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/CHANGELOG.md +28 -0
- package/bin/azuread_update_callbacks_for_app.sh +0 -0
- package/bin/tenable-scan.sh +0 -0
- package/bin/xray-bitbucket-insights.sh +0 -0
- package/bin/xray-html-report.sh +0 -0
- package/next/changeset.sh +0 -0
- package/next/copy.sh +0 -0
- package/next/deploy.sh +0 -0
- package/next/execute.sh +0 -0
- package/next/sonar.sh +0 -0
- package/package.json +12 -11
- package/pnpm-workspace.yaml +3 -0
- package/src/auth0/cli.js +0 -0
- package/src/changeset/cli.js +0 -0
- package/src/merge/cli.js +0 -0
- package/src/micro/cli.js +0 -0
- package/src/micro/ms-deploy.js +0 -0
- package/src/micro/ms-publish.js +0 -0
- package/src/next/cli.js +15 -2
- package/src/next/connect-aws-cli.js +206 -0
- package/src/next/connect-aws.js +1770 -0
- package/src/next/deploy.test.js +1 -0
- package/src/tenable/cli.js +0 -0
- package/src/veracode/cli.js +0 -0
- package/src/xray/cli.js +0 -0
- package/terraform/init.sh +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @docupace/pipeline
|
|
2
2
|
|
|
3
|
+
## 1.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- acec071: DC-106888 Publish the CONNECT AWS onboarding release under a new version. The 1.1.0 release commit could not be tagged because v1.1.0 already existed on an older commit, so this patch release tags the onboarding code as v1.1.1 with no code changes.
|
|
8
|
+
|
|
9
|
+
## 1.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 126e3d3: DC-106887 Create or populate the dedicated CONNECT runtime secret with its existing secret.conf field, validate required values, reuse complete credentials, and resolve SSO settings and database credentials from target environment sources. Keep the shared site secret and Helm charts unchanged.
|
|
14
|
+
|
|
15
|
+
DC-106888 Add idempotent CONNECT/CORE/NEXT fleet registration for prepared site values, preserving existing chart revisions and unrelated applications. Validate that CONNECT onboarding branches contain only the intended fleet addition before automatic merge.
|
|
16
|
+
|
|
17
|
+
Normalize preprod to qa and staging/stg to stage across onboarding commands, retaining preprod-site-settings and staging-site-settings repository names. Preserve matching explicit namespaces in existing fleet entries.
|
|
18
|
+
|
|
19
|
+
Require successful downstream configuration sync completion when requested by onboarding, with bounded polling and failure reporting after Git publication.
|
|
20
|
+
|
|
21
|
+
- 213dbc2: DC-106885 Add copy-connect-site for the existing site-setup pipeline, supporting the default template or an existing site, cross-environment copies with target backend settings, target Core identity and Auth0 SAML metadata. Keep CONNECT AWS SAML generation in connect-aws.js and route the metadata CLI to it without changing the working directory; leave the legacy metadata module unchanged.
|
|
22
|
+
|
|
23
|
+
Resolve target Core identity and database configuration from the target environment's site-settings checkout, retaining explicit overrides for exceptional configurations.
|
|
24
|
+
|
|
25
|
+
Add explicit force-overwrite support to regenerate an existing target, preparing replacement files before swapping directories and restoring the previous files if installation fails.
|
|
26
|
+
|
|
27
|
+
Add read-only Pod Identity/runtime-secret readiness and published-image checks for conditional GitOps merges. Restore the legacy Connect auto-login and Next UI launch settings when copying a site.
|
|
28
|
+
|
|
29
|
+
Preserve the selected source image repository and exact tag. An explicit image-tag override changes only the tag; image validation does not substitute a shared repository or a v-prefixed tag.
|
|
30
|
+
|
|
3
31
|
## 1.1.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|
|
File without changes
|
package/bin/tenable-scan.sh
CHANGED
|
File without changes
|
|
File without changes
|
package/bin/xray-html-report.sh
CHANGED
|
File without changes
|
package/next/changeset.sh
CHANGED
|
File without changes
|
package/next/copy.sh
CHANGED
|
File without changes
|
package/next/deploy.sh
CHANGED
|
File without changes
|
package/next/execute.sh
CHANGED
|
File without changes
|
package/next/sonar.sh
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docupace/pipeline",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"prepublishOnly": "pnpm test",
|
|
9
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage --testPathIgnorePatterns='src/next/test\\.js'",
|
|
10
|
+
"test-deploy-core": "dp-next-cli deploy-core-pipeline dev template",
|
|
11
|
+
"test-deploy-from-site": "dp-next-cli deploy-from-site --from-env dev --to-env dev --from-site financialdev --to-site template --deploy-core true",
|
|
12
|
+
"test-run-pipline": "dp-next-cli run-pipeline -r docupace-next-e2e -b master -p run-tests-qa",
|
|
13
|
+
"test-validate": "dp-changset-cli validate",
|
|
14
|
+
"test-create": "dp-changset-cli create-changeset",
|
|
15
|
+
"lint:fix": "eslint --fix \"src/**/*.{js,jsx,ts,tsx}\""
|
|
16
|
+
},
|
|
7
17
|
"exports": {
|
|
8
18
|
"./changelogCanny": "./src/changeset/changelog-module.cjs"
|
|
9
19
|
},
|
|
@@ -53,14 +63,5 @@
|
|
|
53
63
|
"globals": "^15.14.0",
|
|
54
64
|
"jest": "^30.4.2",
|
|
55
65
|
"prettier": "^3.4.2"
|
|
56
|
-
},
|
|
57
|
-
"scripts": {
|
|
58
|
-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage --testPathIgnorePatterns='src/next/test\\.js'",
|
|
59
|
-
"test-deploy-core": "dp-next-cli deploy-core-pipeline dev template",
|
|
60
|
-
"test-deploy-from-site": "dp-next-cli deploy-from-site --from-env dev --to-env dev --from-site financialdev --to-site template --deploy-core true",
|
|
61
|
-
"test-run-pipline": "dp-next-cli run-pipeline -r docupace-next-e2e -b master -p run-tests-qa",
|
|
62
|
-
"test-validate": "dp-changset-cli validate",
|
|
63
|
-
"test-create": "dp-changset-cli create-changeset",
|
|
64
|
-
"lint:fix": "eslint --fix \"src/**/*.{js,jsx,ts,tsx}\""
|
|
65
66
|
}
|
|
66
|
-
}
|
|
67
|
+
}
|
package/pnpm-workspace.yaml
CHANGED
package/src/auth0/cli.js
CHANGED
|
File without changes
|
package/src/changeset/cli.js
CHANGED
|
File without changes
|
package/src/merge/cli.js
CHANGED
|
File without changes
|
package/src/micro/cli.js
CHANGED
|
File without changes
|
package/src/micro/ms-deploy.js
CHANGED
|
File without changes
|
package/src/micro/ms-publish.js
CHANGED
|
File without changes
|
package/src/next/cli.js
CHANGED
|
@@ -20,7 +20,8 @@ import { connectClone } from './connect.js';
|
|
|
20
20
|
import dotenv from 'dotenv';
|
|
21
21
|
import { $ } from 'zx';
|
|
22
22
|
import { deployConnect, deployCore } from './jenkins.js';
|
|
23
|
-
import { deployConnectAws } from './connect-aws.js';
|
|
23
|
+
import { deployConnectAws, runPipelineChecked } from './connect-aws.js';
|
|
24
|
+
import { registerConnectAwsCommands } from './connect-aws-cli.js';
|
|
24
25
|
import { runPipeline } from './pipline.js';
|
|
25
26
|
|
|
26
27
|
dotenv.config({ path: ['.env.pipeline.local', 'config/.env.pipeline.local'] });
|
|
@@ -57,6 +58,8 @@ program
|
|
|
57
58
|
await connectClone();
|
|
58
59
|
});
|
|
59
60
|
|
|
61
|
+
registerConnectAwsCommands(program);
|
|
62
|
+
|
|
60
63
|
program
|
|
61
64
|
.command('haproxySync')
|
|
62
65
|
.description('Sync haproxy config')
|
|
@@ -318,12 +321,22 @@ program
|
|
|
318
321
|
{},
|
|
319
322
|
)
|
|
320
323
|
.option('-w, --wait', 'Wait for the pipeline to complete', false) // Defaults to false
|
|
324
|
+
.option(
|
|
325
|
+
'--require-success',
|
|
326
|
+
'Fail unless the downstream pipeline succeeds',
|
|
327
|
+
false,
|
|
328
|
+
)
|
|
321
329
|
.action(async (cmdObj) => {
|
|
322
330
|
try {
|
|
323
331
|
const { repository, pipelineName, branch, variables, wait } = cmdObj;
|
|
324
332
|
|
|
325
333
|
// Call the triggerPipelineByName function
|
|
326
|
-
|
|
334
|
+
if (cmdObj.requireSuccess) {
|
|
335
|
+
if (!wait) throw new Error('--require-success requires --wait.');
|
|
336
|
+
await runPipelineChecked(repository, pipelineName, branch, variables);
|
|
337
|
+
} else {
|
|
338
|
+
await runPipeline(repository, pipelineName, branch, variables, wait);
|
|
339
|
+
}
|
|
327
340
|
} catch (error) {
|
|
328
341
|
console.error('Error triggering pipeline:', error.message);
|
|
329
342
|
process.exit(1);
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { writeFile } from 'node:fs/promises';
|
|
2
|
+
import {
|
|
3
|
+
copyConnectSite,
|
|
4
|
+
ensureConnectRuntimeSecret,
|
|
5
|
+
registerSiteApps,
|
|
6
|
+
getFleetValuesSource,
|
|
7
|
+
validateConnectFleetChange,
|
|
8
|
+
syncConnectConfig,
|
|
9
|
+
} from './connect-aws.js';
|
|
10
|
+
|
|
11
|
+
export function registerConnectAwsCommands(program) {
|
|
12
|
+
program
|
|
13
|
+
.command('prepare-connect-secret')
|
|
14
|
+
.description('Create or populate the dedicated CONNECT runtime secret')
|
|
15
|
+
.requiredOption('--env <env>', 'Target environment')
|
|
16
|
+
.requiredOption('--site <site>', 'Target site')
|
|
17
|
+
.requiredOption(
|
|
18
|
+
'--site-settings-path <path>',
|
|
19
|
+
'Target Core site-settings checkout',
|
|
20
|
+
)
|
|
21
|
+
.option('--core-schema <schema>', 'Override target Core settings directory')
|
|
22
|
+
.option(
|
|
23
|
+
'--db-source-secret <name>',
|
|
24
|
+
'Target-account DB credential source; defaults to target CONNECT template',
|
|
25
|
+
)
|
|
26
|
+
.option(
|
|
27
|
+
'--db-user-property <name>',
|
|
28
|
+
'DB username property',
|
|
29
|
+
'CONNECT_DB_USER',
|
|
30
|
+
)
|
|
31
|
+
.option(
|
|
32
|
+
'--db-password-property <name>',
|
|
33
|
+
'DB password property',
|
|
34
|
+
'CONNECT_DB_PASSWORD',
|
|
35
|
+
)
|
|
36
|
+
.option('--dry-run', 'Validate and report without writing AWS', false)
|
|
37
|
+
.option(
|
|
38
|
+
'--result-file <path>',
|
|
39
|
+
'Write secret reference only, without credential values',
|
|
40
|
+
)
|
|
41
|
+
.action(async ({ resultFile, ...options }) => {
|
|
42
|
+
try {
|
|
43
|
+
const result = await ensureConnectRuntimeSecret(options);
|
|
44
|
+
if (resultFile)
|
|
45
|
+
await writeFile(resultFile, JSON.stringify(result, null, 2));
|
|
46
|
+
console.log(
|
|
47
|
+
`CONNECT runtime secret ${result.status}: ${result.secretName}`,
|
|
48
|
+
);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error(error.message);
|
|
51
|
+
process.exitCode = 1;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
program
|
|
56
|
+
.command('validate-connect-fleet-change')
|
|
57
|
+
.description(
|
|
58
|
+
'Reject existing or unrelated fleet edits before an automatic CONNECT merge',
|
|
59
|
+
)
|
|
60
|
+
.requiredOption('--env <env>', 'Target environment')
|
|
61
|
+
.requiredOption('--site <site>', 'Target site')
|
|
62
|
+
.requiredOption('--before-file <path>', 'Fleet at the branch merge base')
|
|
63
|
+
.requiredOption('--after-file <path>', 'Prepared fleet')
|
|
64
|
+
.action(async (options) => {
|
|
65
|
+
try {
|
|
66
|
+
await validateConnectFleetChange(options);
|
|
67
|
+
console.log(
|
|
68
|
+
'CONNECT fleet changes are limited to the target registration.',
|
|
69
|
+
);
|
|
70
|
+
} catch (error) {
|
|
71
|
+
console.error(error.message);
|
|
72
|
+
process.exitCode = 1;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
program
|
|
77
|
+
.command('register-site-apps')
|
|
78
|
+
.description(
|
|
79
|
+
'Register prepared CONNECT, CORE and NEXT site values in the target fleets',
|
|
80
|
+
)
|
|
81
|
+
.requiredOption('--env <env>', 'Target environment')
|
|
82
|
+
.requiredOption('--site <site>', 'Target site')
|
|
83
|
+
.option('--apps <apps>', 'Comma-separated CONNECT,CORE,NEXT', 'CONNECT')
|
|
84
|
+
.option('--connect-repo-path <path>', 'CONNECT GitOps checkout')
|
|
85
|
+
.option('--next-repo-path <path>', 'NEXT/Core chart and fleet checkout')
|
|
86
|
+
.option('--config-repo-path <path>', 'Target gitops-env values checkout')
|
|
87
|
+
.option(
|
|
88
|
+
'--config-revision <revision>',
|
|
89
|
+
'Revision of the target values checkout',
|
|
90
|
+
)
|
|
91
|
+
.option(
|
|
92
|
+
'--chart-revision <revision>',
|
|
93
|
+
'Chart revision for new CORE/NEXT applications',
|
|
94
|
+
'develop',
|
|
95
|
+
)
|
|
96
|
+
.option('--dry-run', 'Validate and report without writing files', false)
|
|
97
|
+
.option(
|
|
98
|
+
'--resolve-config-source',
|
|
99
|
+
'Report the configured CORE/NEXT values source only',
|
|
100
|
+
false,
|
|
101
|
+
)
|
|
102
|
+
.option('--result-file <path>', 'Write planned/updated fleet paths')
|
|
103
|
+
.action(async ({ resultFile, ...options }) => {
|
|
104
|
+
try {
|
|
105
|
+
const result = options.resolveConfigSource
|
|
106
|
+
? await getFleetValuesSource(options)
|
|
107
|
+
: await registerSiteApps(options);
|
|
108
|
+
if (resultFile)
|
|
109
|
+
await writeFile(resultFile, JSON.stringify(result, null, 2));
|
|
110
|
+
console.log(JSON.stringify(result));
|
|
111
|
+
} catch (error) {
|
|
112
|
+
console.error(error.message);
|
|
113
|
+
process.exitCode = 1;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
program
|
|
118
|
+
.command('copy-connect-site')
|
|
119
|
+
.description(
|
|
120
|
+
'Copy a CONNECT GitOps template and generate target Auth0 SAML configuration',
|
|
121
|
+
)
|
|
122
|
+
.requiredOption('-e, --env <env>', 'Target environment')
|
|
123
|
+
.requiredOption('-s, --site <site>', 'New target site')
|
|
124
|
+
.option(
|
|
125
|
+
'--force-overwrite',
|
|
126
|
+
'Replace an existing target site with regenerated source configuration',
|
|
127
|
+
false,
|
|
128
|
+
)
|
|
129
|
+
.option(
|
|
130
|
+
'--site-settings-path <path>',
|
|
131
|
+
'Target Core site-settings checkout for automatic configuration',
|
|
132
|
+
)
|
|
133
|
+
.option('--core-schema <schema>', 'Override target Core database schema')
|
|
134
|
+
.option('--core-realm <realm>', 'Override target Core private realm')
|
|
135
|
+
.option(
|
|
136
|
+
'--runtime-secret-name <name>',
|
|
137
|
+
'Prepared target AWS runtime secret',
|
|
138
|
+
)
|
|
139
|
+
.option(
|
|
140
|
+
'--template-site <site>',
|
|
141
|
+
'Source template or existing site',
|
|
142
|
+
'template',
|
|
143
|
+
)
|
|
144
|
+
.option(
|
|
145
|
+
'--template-env <env>',
|
|
146
|
+
'Source environment (defaults to target environment)',
|
|
147
|
+
)
|
|
148
|
+
.option(
|
|
149
|
+
'--db-url <url>',
|
|
150
|
+
'Target JDBC URL; required for cross-environment copies',
|
|
151
|
+
)
|
|
152
|
+
.option(
|
|
153
|
+
'--core-api-url <url>',
|
|
154
|
+
'Target Core backend URL; required for cross-environment copies',
|
|
155
|
+
)
|
|
156
|
+
.option(
|
|
157
|
+
'--result-file <path>',
|
|
158
|
+
'Write generated site identity as JSON for pipeline orchestration',
|
|
159
|
+
)
|
|
160
|
+
.option(
|
|
161
|
+
'--repo-path <path>',
|
|
162
|
+
'Existing CONNECT GitOps checkout',
|
|
163
|
+
process.cwd(),
|
|
164
|
+
)
|
|
165
|
+
.option('--base-url <url>', 'Public CONNECT HTTPS origin')
|
|
166
|
+
.option(
|
|
167
|
+
'--core-url <url>',
|
|
168
|
+
'Public Core URL (defaults to target origin/core)',
|
|
169
|
+
)
|
|
170
|
+
.option(
|
|
171
|
+
'--image-tag <tag>',
|
|
172
|
+
'Override the inherited image tag; keep the source image repository',
|
|
173
|
+
)
|
|
174
|
+
.option('--context-path <path>', 'CONNECT context path', '/connect')
|
|
175
|
+
.option(
|
|
176
|
+
'--auth0-tenant <tenant>',
|
|
177
|
+
'Target Auth0 tenant name or auth0.com domain',
|
|
178
|
+
'',
|
|
179
|
+
)
|
|
180
|
+
.action(async (options) => {
|
|
181
|
+
try {
|
|
182
|
+
const { resultFile, ...copyOptions } = options;
|
|
183
|
+
const result = await copyConnectSite(copyOptions);
|
|
184
|
+
if (resultFile)
|
|
185
|
+
await writeFile(resultFile, JSON.stringify(result, null, 2));
|
|
186
|
+
} catch (error) {
|
|
187
|
+
console.error(`CONNECT site copy failed: ${error.message}`);
|
|
188
|
+
process.exitCode = 1;
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
program
|
|
193
|
+
.command('sync-connect-config')
|
|
194
|
+
.description(
|
|
195
|
+
'Run the target CONNECT GitOps configuration sync and require success',
|
|
196
|
+
)
|
|
197
|
+
.requiredOption('-e, --env <env>', 'Target CONNECT environment')
|
|
198
|
+
.action(async (options) => {
|
|
199
|
+
try {
|
|
200
|
+
await syncConnectConfig(options);
|
|
201
|
+
} catch (error) {
|
|
202
|
+
console.error(error.message);
|
|
203
|
+
process.exitCode = 1;
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
}
|