@docupace/pipeline 1.0.5-alpha.13 → 1.0.5-alpha.15

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/pipeline",
3
- "version": "1.0.5-alpha.13",
3
+ "version": "1.0.5-alpha.15",
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-pipline 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,22 @@ 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, liquibase) => {
67
- await deployCore(env, site, liquibase);
66
+ .option('-b, --branch <branch>', 'Branch', 'master')
67
+ .action(async (env, site, options) => {
68
+ await deployCore(env, site, options.liquibase, options.branch);
68
69
  });
69
70
 
70
71
  program
71
72
  .command('deploy-core-pipeline <env> <site>')
72
73
  .description('Deploy Core')
73
74
  .option('-l, --liquibase <liquibase>', 'Application name', 'true')
74
- .action(async (env, site, liquibase) => {
75
- await runPipeline('site-deploy', 'deploy-core', {
75
+ .option('-b, --branch <branch>', 'Branch', 'master')
76
+ .action(async (env, site, options) => {
77
+ await runPipeline('site-deploy', 'deploy-core', 'main', {
76
78
  ENV: env,
77
79
  SITE: site,
78
- LIQUIBASE: liquibase,
80
+ LIQUIBASE: options.liquibase,
81
+ GIT_BRANCH: options.branch,
79
82
  });
80
83
  });
81
84
 
@@ -5,11 +5,12 @@ const JOB_NAME = 'auto-deploy-site';
5
5
  const USERNAME = process.env.CORE_JENKINS_USERNAME;
6
6
  const API_TOKEN = process.env.CORE_JENKINS_API_TOKEN;
7
7
 
8
- export async function deployCore(env, site, liquibase) {
8
+ export async function deployCore(env, site, liquibase, gitBranch) {
9
9
  const parameters = {
10
10
  environment: env,
11
- site: site,
11
+ site: site.toUpperCase(),
12
12
  runLiquibase: liquibase,
13
+ gitBranch,
13
14
  };
14
15
 
15
16
  try {
@@ -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: {