diff --git a/packages/infra/infra-shared/src/stacks/ci/ciPipeline.ts b/packages/infra/infra-shared/src/stacks/ci/ciPipeline.ts index 3f6fb4b16..8925bce8d 100644 --- a/packages/infra/infra-shared/src/stacks/ci/ciPipeline.ts +++ b/packages/infra/infra-shared/src/stacks/ci/ciPipeline.ts @@ -80,11 +80,13 @@ export class CiPipeline extends Construct { inputArtifact: sourceOutputArtifact, }); - new UploadVersionCiConfig(this, 'UploadVersionConfig', { - envSettings: props.envSettings, - stage: deployStage, - inputArtifact: sourceOutputArtifact, - }); + if (props.envSettings.tools.enabled) { + new UploadVersionCiConfig(this, 'UploadVersionConfig', { + envSettings: props.envSettings, + stage: deployStage, + inputArtifact: sourceOutputArtifact, + }); + } } private selectStage(name: string, pipeline: Pipeline) { diff --git a/packages/internal/docs/docs/aws/deploy-to-aws/create-env-stage-in-repo.mdx b/packages/internal/docs/docs/aws/deploy-to-aws/create-env-stage-in-repo.mdx index 2790532c3..1f176a5b4 100644 --- a/packages/internal/docs/docs/aws/deploy-to-aws/create-env-stage-in-repo.mdx +++ b/packages/internal/docs/docs/aws/deploy-to-aws/create-env-stage-in-repo.mdx @@ -121,6 +121,10 @@ pnpm saas aws set-var SB_DEPLOY_BRANCHES master ### \[Optional\] Set tools env variables +The `tools` package during CI deployment is responsible for uploading the information of the version of deployed +application on specific environment. Then, you will be able to check currently deployed state in the +[version matrix](../../../working-with-sb/dev-tools/version-matrix). + To configure `tools` package env variables follow the example below. ```shell @@ -131,6 +135,14 @@ pnpm saas aws set-var SB_TOOLS_HOSTED_ZONE_NAME example.com pnpm saas aws set-var SB_TOOLS_DOMAIN_VERSION_MATRIX status.example.com ``` +:::info + +If you set `SB_TOOLS_ENABLED` to `true` make sure to deploy **version matrix** component before first CI pipeline run. + +Follow the [deployment instructions](../../../working-with-sb/dev-tools/version-matrix#deployment) for more details. + +::: + ## Env variable validation You can look up the validator in `packages/internal/cli/src/config/env.ts`, which runs on every `nx` command that