@docupace/pipeline 1.0.5-alpha.12 → 1.0.5-alpha.14
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 +2 -2
- package/src/next/cli.js +5 -5
- package/src/next/jenkins.js +2 -1
- package/src/next/pipline.js +1 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docupace/pipeline",
|
|
3
|
-
"version": "1.0.5-alpha.
|
|
3
|
+
"version": "1.0.5-alpha.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"prettier": "^3.4.2"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
|
-
"test-deploy-core": "dp-next-cli deploy-core dev template",
|
|
37
|
+
"test-deploy-core": "dp-next-cli deploy-core-pipeline dev template",
|
|
38
38
|
"test-deploy-from-site": "dp-next-cli deploy-from-site --from-env dev --to-env dev --from-site financialdev --to-site template"
|
|
39
39
|
}
|
|
40
40
|
}
|
package/src/next/cli.js
CHANGED
|
@@ -63,19 +63,19 @@ program
|
|
|
63
63
|
.command('deploy-core <env> <site>')
|
|
64
64
|
.description('Deploy Core')
|
|
65
65
|
.option('-l, --liquibase <liquibase>', 'Application name', 'true')
|
|
66
|
-
.action(async (env, site,
|
|
67
|
-
await deployCore(env, site, liquibase);
|
|
66
|
+
.action(async (env, site, options) => {
|
|
67
|
+
await deployCore(env, site, options.liquibase);
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
program
|
|
71
71
|
.command('deploy-core-pipeline <env> <site>')
|
|
72
72
|
.description('Deploy Core')
|
|
73
73
|
.option('-l, --liquibase <liquibase>', 'Application name', 'true')
|
|
74
|
-
.action(async (env, site,
|
|
75
|
-
await runPipeline('site-deploy', 'deploy-core', {
|
|
74
|
+
.action(async (env, site, options) => {
|
|
75
|
+
await runPipeline('site-deploy', 'deploy-core', 'main', {
|
|
76
76
|
ENV: env,
|
|
77
77
|
SITE: site,
|
|
78
|
-
LIQUIBASE: liquibase,
|
|
78
|
+
LIQUIBASE: options.liquibase,
|
|
79
79
|
});
|
|
80
80
|
});
|
|
81
81
|
|
package/src/next/jenkins.js
CHANGED
|
@@ -8,8 +8,9 @@ const API_TOKEN = process.env.CORE_JENKINS_API_TOKEN;
|
|
|
8
8
|
export async function deployCore(env, site, liquibase) {
|
|
9
9
|
const parameters = {
|
|
10
10
|
environment: env,
|
|
11
|
-
site: site,
|
|
11
|
+
site: site.toUpperCase(),
|
|
12
12
|
runLiquibase: liquibase,
|
|
13
|
+
gitBranch: 'master',
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
try {
|
package/src/next/pipline.js
CHANGED
|
@@ -18,6 +18,7 @@ async function triggerPipelineByName(
|
|
|
18
18
|
|
|
19
19
|
const payload = {
|
|
20
20
|
target: {
|
|
21
|
+
type: 'pipeline_ref_target',
|
|
21
22
|
ref_type: 'branch',
|
|
22
23
|
ref_name: branch,
|
|
23
24
|
selector: {
|
|
@@ -91,11 +92,3 @@ export async function runPipeline(repository, pipelineName, branch, variables) {
|
|
|
91
92
|
console.error('Error monitoring pipeline:', error.message);
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
|
-
|
|
95
|
-
// Example: Trigger and monitor a custom pipeline
|
|
96
|
-
const variables = {
|
|
97
|
-
ENV: 'production',
|
|
98
|
-
DEPLOY_VERSION: 'v1.2.3',
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
runPipeline('site-deploy', 'deploy-to-production', 'main', variables);
|