@docupace/pipeline 1.0.39-matttest.25 → 1.0.39-matttest.27

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/README.md ADDED
@@ -0,0 +1,136 @@
1
+ # Pipeline Shared Scripts
2
+
3
+ A collection of CLI tools for Docupace's CI/CD pipelines and deployment workflows.
4
+
5
+ ## Overview
6
+
7
+ This package provides a set of command-line interfaces (CLIs) to facilitate various DevOps operations in the Docupace ecosystem:
8
+
9
+ - `dp-next-cli`: Deployment and pipeline management for Next applications
10
+ - `dp-changeset-cli`: Versioning and changeset management
11
+ - `dp-auth0-cli`: Auth0 tenant configuration and management
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install @docupace/pipeline
17
+ ```
18
+
19
+ Or with pnpm:
20
+
21
+ ```bash
22
+ pnpm add @docupace/pipeline
23
+ ```
24
+
25
+ ## Command Line Interfaces
26
+
27
+ ### dp-next-cli
28
+
29
+ Manages deployment, Docker image handling, and infrastructure configuration.
30
+
31
+ ```bash
32
+ dp-next-cli [command] [options]
33
+ ```
34
+
35
+ **Commands:**
36
+
37
+ - `pull <imageName>`: Pull a Docker image from the registry
38
+ - `sonar`: Run Sonar analysis
39
+ - `addApacheSite`: Add site to apache
40
+ - `connectClone`: Clone connect site
41
+ - `haproxySync`: Sync haproxy config
42
+ - `vaultAddSiteData`: Add m2m auth0 data to vault
43
+ - `-s, --site-name <siteName>`: Site name
44
+ - `-p, --site-config-remote-path <path>`: Site config remote path
45
+ - `publish`: Publish a Docker image
46
+ - `deploy-from-site`: Deploy an application for a specific site
47
+ - `-f, --from-env <fromEnv>`: Source environment
48
+ - `-t, --to-env <toEnv>`: Target environment
49
+ - `-F, --from-site <fromSite>`: Source site
50
+ - `-T, --to-site <toSite>`: Target site
51
+ - `-c, --deploy-core <deployCore>`: Deploy Core (default: "false")
52
+ - `-C, --deploy-connect <deployConnect>`: Deploy Connect (default: "false")
53
+ - `deploy-template`: Deploy an application for a specific site
54
+ - `deploy-app <application>`: Deploy an application for a specific site
55
+ - `deploy-core <env> <site>`: Deploy Core
56
+ - `-l, --liquibase <liquibase>`: Application name (default: "true")
57
+ - `-b, --branch <branch>`: Branch (default: "master")
58
+ - `deploy-connect <env> <site>`: Deploy Connect
59
+ - `-l, --liquibase <liquibase>`: Application name (default: "true")
60
+ - `-b, --branch <branch>`: Branch (default: "master")
61
+ - `deploy-core-pipeline <env> <site>`: Deploy Core via pipeline
62
+ - `-l, --liquibase <liquibase>`: Application name (default: "true")
63
+ - `-b, --branch <branch>`: Branch (default: "master")
64
+ - `copy`: Copy a Docker image between registries
65
+ - `-a, --application <application>`: Application name
66
+ - `-f, --from-env <fromEnv>`: Source environment
67
+ - `-t, --to-env <toEnv>`: Target environment
68
+ - `-g, --tag <tag>`: Image tag
69
+ - `run-pipeline`: Trigger a pipeline by name
70
+ - `-r, --repository <repository>`: Repository name
71
+ - `-p, --pipeline-name <pipelineName>`: Pipeline name
72
+ - `-b, --branch <branch>`: Branch name
73
+ - `-v, --variables <key=value>`: Pipeline variable as key=value pair
74
+ - `-w, --wait`: Wait for the pipeline to complete (default: false)
75
+
76
+ ### dp-changeset-cli
77
+
78
+ Manages versioning and changesets for mono-repos and single-package repos.
79
+
80
+ ```bash
81
+ dp-changeset-cli [command] [options]
82
+ ```
83
+
84
+ **Commands:**
85
+
86
+ - `validate`: Validate changesets for the provided PR
87
+ - `version`: Run Changeset versioning
88
+ - `commit-tag`: Commit and tag the new version
89
+ - `version-commit-tag`: Run versioning and commit-and-tag in sequence
90
+ - `close-version`: Close a version and create a release branch
91
+ - `create-changeset`: Create a changeset based on the current branch and Jira ticket information
92
+
93
+ ### dp-auth0-cli
94
+
95
+ Manages Auth0 tenant configuration across environments.
96
+
97
+ ```bash
98
+ dp-auth0-cli [command] [options]
99
+ ```
100
+
101
+ **Commands:**
102
+
103
+ - `configureFromSite <fromSite> <toSite> <fromEnv> <toEnv> <deployUI> <deployGraphQLServer> <useNewDomain> <useS3>`: Configure Auth0 tenants
104
+ - `getVaultSecrets <vaultPath>`: Get secrets from Vault
105
+ - `configureAlias <site> <env> <username> <password> <realm>`: Configure Core Alias for the given site
106
+ - `exportConf <site> <env>`: Export Auth0 configuration for the given site
107
+ - `getAuth0Metadata <site> <env>`: Get Auth0 metadata for the given site
108
+
109
+ ## Environment Configuration
110
+
111
+ The CLI tools look for environment configuration in the following locations:
112
+ - `.env.pipeline.local`
113
+ - `config/.env.pipeline.local`
114
+
115
+ ## Examples
116
+
117
+ ```bash
118
+ # Deploy from one site to another
119
+ dp-next-cli deploy-from-site --from-env dev --to-env dev --from-site financialdev --to-site template --deploy-core true
120
+
121
+ # Run a pipeline
122
+ dp-next-cli run-pipeline -r docupace-next-e2e -b master -p run-tests-qa
123
+
124
+ # Validate changesets
125
+ dp-changeset-cli validate
126
+
127
+ # Create a new changeset
128
+ dp-changeset-cli create-changeset
129
+
130
+ # Configure Auth0 for a site
131
+ dp-auth0-cli configureFromSite sourceSite targetSite dev prod true true true false
132
+ ```
133
+
134
+ ## License
135
+
136
+ ISC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/pipeline",
3
- "version": "1.0.39-matttest.25",
3
+ "version": "1.0.39-matttest.27",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -4,7 +4,7 @@ import z from 'zod';
4
4
  import { zodResponseFormat } from 'openai/helpers/zod';
5
5
  import fs from 'fs';
6
6
  import path from 'path';
7
- import { getAllAppPackages, isMonoRepo } from '../next/util.js';
7
+ import { getAllAppPackages, getAllPackages, isMonoRepo } from '../next/util.js';
8
8
  import inquirer from 'inquirer';
9
9
  import { getMainPackage, getPackage } from './util.js';
10
10
 
@@ -128,17 +128,17 @@ ${summary} [${jiraTicketId}]
128
128
 
129
129
  export async function createChangeset() {
130
130
  if (isMonoRepo()) {
131
- const appPackages = await getAllAppPackages();
131
+ const allPackages = await getAllPackages();
132
132
  const response = await inquirer.prompt([
133
133
  {
134
134
  type: 'list',
135
135
  name: 'package',
136
136
  message: 'Which package do you want to generate changesetfor?',
137
- choices: appPackages.map((appPackage) => appPackage.name),
137
+ choices: allPackages.map((appPackage) => appPackage.name),
138
138
  },
139
139
  ]);
140
140
 
141
- const selectedPackage = appPackages.find(
141
+ const selectedPackage = allPackages.find(
142
142
  (appPackage) => appPackage.name == response.package,
143
143
  );
144
144
 
package/src/next/cli.js CHANGED
@@ -163,13 +163,6 @@ program
163
163
  });
164
164
  });
165
165
 
166
- program
167
- .command('build-mono-repo')
168
- .description('Build Mono Repo')
169
- .action(async () => {
170
- await buildChangePackages();
171
- });
172
-
173
166
  program
174
167
  .command('copy')
175
168
  .description('Copy a Docker image between registries')