@docupace/pipeline
v1.1.13
Published
A collection of CLI tools for Docupace's CI/CD pipelines and deployment workflows.
Maintainers
Keywords
Readme
Pipeline Shared Scripts
A collection of CLI tools for Docupace's CI/CD pipelines and deployment workflows.
Overview
This package provides a set of command-line interfaces (CLIs) to facilitate various DevOps operations in the Docupace ecosystem:
dp-next-cli: Deployment and pipeline management for Next applicationsdp-changeset-cli: Versioning and changeset managementdp-auth0-cli: Auth0 tenant configuration and management
Installation
npm install @docupace/pipelineOr with pnpm:
pnpm add @docupace/pipelineCommand Line Interfaces
dp-next-cli
Manages deployment, Docker image handling, and infrastructure configuration.
dp-next-cli [command] [options]Commands:
pull <imageName>: Pull a Docker image from the registrysonar: Run Sonar analysisvalidate-seeding-guids: Fail on duplicate or non-string GUIDs, warn on non-32-char ones, in template seeding data (run from the template repo root)--data-dir <dir>: Seeding data directory (defaultdata)
addApacheSite: Add site to apacheconnectClone: Clone connect sitehaproxySync: Sync haproxy configvaultAddSiteData: Add m2m auth0 data to vault-s, --site-name <siteName>: Site name-p, --site-config-remote-path <path>: Site config remote path
publish: Publish a Docker imagedeploy-from-site: Deploy an application for a specific site-f, --from-env <fromEnv>: Source environment-t, --to-env <toEnv>: Target environment-F, --from-site <fromSite>: Source site-T, --to-site <toSite>: Target site-j, --jira-ticket [jiraTicket]: JIRA ticket (optional)-c, --deploy-core <deployCore>: Deploy Core (default: "false")-C, --deploy-connect <deployConnect>: Deploy Connect (default: "false")-A, --deploy-connect-aws <deployConnectAws>: Deploy Connect UI on AWS viadp-eks-connect-ui-gitops(default: "false")
update-site-version <env> <site>: Update specific version components for a site-u, --ui-version <uiVersion>: UI image tag-g, --graph-version <graphVersion>: GraphQL-server image tag-S, --standard-config <standardConfig>: Standard config remote branch-s, --site-config <siteConfig>: Site config remote branch-c, --connect-version <connectVersion>: AWS Connect UI image tag (optional)-j, --jira-ticket [jiraTicket]: JIRA ticket (required for prod)
deploy-template: Deploy an application for a specific sitedeploy-app <application>: Deploy an application for a specific sitedeploy-app connect -e <env> -s <site>: Deploy AWS Connect UI (triggersdeploy-connect-aws/ gitopsupdate-site-image)-e, --env <env>/-s, --site <site>: Target env/site (optional; otherwise uses auto-deploy targets)
deploy-core <env> <site>: Deploy Core-l, --liquibase <liquibase>: Application name (default: "true")-b, --branch <branch>: Branch (default: "master")
deploy-connect <env> <site>: Deploy Connect-l, --liquibase <liquibase>: Application name (default: "true")-b, --branch <branch>: Branch (default: "master")
deploy-connect-aws <env> <sites> <version>: Deploy Connect UI on AWS (updatesdp-eks-connect-ui-gitopsimage.tag via Bitbucket pipeline)<sites>: single site or comma-separated list (e.g.oaoroa,athene,template)-b, --branch <branch>: Gitops branch for the pipeline (default: "main")-w, --wait/--no-wait: Wait for pipeline completion (default: wait)
deploy-core-pipeline <env> <site>: Deploy Core via pipeline-l, --liquibase <liquibase>: Application name (default: "true")-b, --branch <branch>: Branch (default: "master")
copy: Copy a Docker image between registries-a, --application <application>: Application name-f, --from-env <fromEnv>: Source environment-t, --to-env <toEnv>: Target environment-g, --tag <tag>: Image tag
run-pipeline: Trigger a pipeline by name-r, --repository <repository>: Repository name-p, --pipeline-name <pipelineName>: Pipeline name-b, --branch <branch>: Branch name-v, --variables <key=value>: Pipeline variable as key=value pair-w, --wait: Wait for the pipeline to complete (default: false)
dp-changeset-cli
Manages versioning and changesets for mono-repos and single-package repos.
dp-changeset-cli [command] [options]Commands:
validate: Validate changesets for the provided PRversion: Run Changeset versioningcommit-tag: Commit and tag the new versionversion-commit-tag: Run versioning and commit-and-tag in sequenceclose-version: Close a version and create a release branchcreate-changeset: Create a changeset based on the current branch and Jira ticket information
dp-auth0-cli
Manages Auth0 tenant configuration across environments and secrets management (Vault and AWS Secrets Manager).
dp-auth0-cli [command] [options]Commands:
configureFromSite <fromSite> <toSite> <fromEnv> <toEnv> <deployUI> <deployGraphQLServer> <useNewDomain> <useS3> [auth0Tenant]: Configure Auth0 tenantsgetVaultSecrets <vaultPath>: Get secrets from VaultgetAwsSecrets <secretName>: Get secrets from AWS Secrets ManagersaveAwsSecret <secretName> <secretData> [-d, --description <desc>]: Save secrets to AWS Secrets ManagerlistAwsSecretsForSite <site>: List AWS Secrets Manager paths for a siteconfigureAlias <site> <env> <username> <password> <realm>: Configure Core Alias for the given siteexportConf <site> <env>: Export Auth0 configuration for the given sitegetAuth0Metadata <site> <env>: Get Auth0 metadata for the given site
Environment Configuration
The CLI tools look for environment configuration in the following locations:
.env.pipeline.localconfig/.env.pipeline.local
Secrets Manager Configuration
By default, the tools use HashiCorp Vault for secrets management. To use AWS Secrets Manager instead, set the SECRETS_MANAGER_TYPE environment variable:
# Use HashiCorp Vault (default)
export SECRETS_MANAGER_TYPE=vault
# Use AWS Secrets Manager
export SECRETS_MANAGER_TYPE=awsVault Configuration (Default)
VAULT_ADDR: Vault server URL (e.g.,https://vault.example.com)VAULT_TOKEN: Vault authentication tokenVAULT_SKIP_VERIFY: Skip TLS certificate verification (optional, set totrue)
AWS Secrets Manager Configuration
AWS_REGION: AWS region (e.g.,us-east-1,eu-west-1)AWS_ACCESS_KEY_ID: AWS access key ID (for manual authentication)AWS_SECRET_ACCESS_KEY: AWS secret access key (for manual authentication)
Note: When running in AWS environments (EC2, ECS, EKS, Lambda), credentials are automatically provided via IAM roles, so you don't need to set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
AWS Secrets Manager Paths
For a given site (e.g., myapp), AWS Secrets Manager follows this naming convention:
common/config- Common secretsmyapp/common/config- Site common secrets (Auth0 client credentials)myapp/graphql-server/config- GraphQL server secretsmyapp/ui/config- UI Main app secretsmyapp/ui-cc/config- UI CC app secretsmyapp/aws/config- AWS S3 configuration secrets
Secrets Supported by App Type
The following secrets are stored for each application:
| App | Secrets | AWS Path |
|-----|---------|----------|
| Auth0 (Common) | AUTH0_CLIENT_ID, AUTH0_CLIENT_SECRET | {site}/common/config |
| GraphQL-Server | AUTH0_CLIENT_ID, AUTH0_CLIENT_SECRET, AUTH0_CC_CLIENT_ID, AUTH0_CC_CLIENT_SECRET | {site}/graphql-server/config |
| UI Main | AUTH0_CLIENT_ID, AUTH0_CLIENT_SECRET, AUTH0_SECRET | {site}/ui/config |
| UI CC | AUTH0_CLIENT_ID, AUTH0_CLIENT_SECRET, AUTH0_SECRET | {site}/ui-cc/config |
Examples
# Deploy from one site to another
dp-next-cli deploy-from-site --from-env dev --to-env dev --from-site financialdev --to-site template --deploy-core true
# Run a pipeline
dp-next-cli run-pipeline -r docupace-next-e2e -b master -p run-tests-qa
# Validate changesets
dp-changeset-cli validate
# Create a new changeset
dp-changeset-cli create-changeset
# Configure Auth0 for a site
dp-auth0-cli configureFromSite sourceSite targetSite dev prod true true true false
# Deploy Connect UI image tag on AWS (single site or comma-separated sites)
dp-next-cli deploy-connect-aws qa 1stglobal 4.75.52
dp-next-cli deploy-connect-aws qa oa,athene,template 4.75.52
# Promote AWS Connect UI version from one site to another via deploy-from-site
dp-next-cli deploy-from-site -f dev -t qa -F template -T template -A trueLicense
ISC
