Skip to main content

init-deployment

@ensono-stacks/workspace:init-deployment

Set up deployment infrastructure for existing workspace
Set up configuration for deployment & infra for the workspace.

Allows you to choose your recommended 3rd party provider options.

Prerequisites

Workspace FE scaffolded using the @ensono-stack/workspace:init generator.

Usage

Scaffold your NX workspace with deployment config using the following command:

nx g @ensono-stacks/workspace:init-deployment

Command line arguments

Interactive options can instead be passed via the command line:

OptionDescriptionTypeAccepted ValuesDefault
--pipelineRunnerWhich pipeline runner to useenum[taskctl, none]taskctl

Generator Output

If --pipelineRunner=taskctl is passed, the generator will also create a build directory:

├── workspace root
│ ├── build
│ ├── ├── azDevOps
│ ├── ├── ├── azuredevops-runner.yaml - Azure Devops pipeline definition. Consumes `stages` and `vars` files in this directory
│ ├── ├── ├── azuredevops-stages.yaml - Azure Devops pipeline stages
│ ├── ├── ├── azuredevops-vars.yaml - Azure Devops variable definitions required by the pipeline
│ ├── ├── taskctl
│ ├── ├── ├── contexts.yaml - Context definitions for taskctl
│ ├── ├── ├── tasks.yaml - Task definitions for taskctl to be consumed by the pipeline

nx.json is also updated with the pipeline runner entry

"@ensono-stacks/workspace": {
"init": {
"pipelineRunner": "taskctl"
}
}

This sets up a CI/CD pipeline to provide a smooth collaborative workflow.

Currently supported pipeline tools are Azure Devops and taskctl.

caution

The build files will only be generated if required project values have been collected from the Stacks CLI or through the @ensono-stacks/create-stacks-workspace plugin.