cdklabs / cdklabs/cdk-cicd-wrapper
[BUG] error message: At least RES stage is required
- Dominant language
- TypeScript
- Stars
- 34
- Forks
- 9
- Avg merge
- 2h 57m
- Merged PRs (30d)
- 48
Description
### Describe the bug
I want to deploy to prod as described here: [Bootstrap your stages](https://cdklabs.github.io/cdk-cicd-wrapper/getting_started/index.html#bootstrap-your-stages)
I copied the stages configuration from the docuemntation:
```ts
.defineStages([Stage.DEV, Stage.INT, Stage.PROD])
```
When I run this command:
```bash
CDK_QUALIFIER=$(jq -r '.config.cdkQualifier' package.json)
npx dotenv-cli -- npm run cdk bootstrap -- --profile $RES_ACCOUNT_AWS_PROFILE --qualifier ${CDK_QUALIFIER} aws://${ACCOUNT_RES}/${AWS_REGION}
```
or this command:
```bash
npx dotenv-cli -- npm run cdk deploy -- --all --region ${AWS_REGION} --profile $RES_ACCOUNT_AWS_PROFILE --qualifier ${CDK_QUALIFIER}
````
I get this error message:
```bash
throw new Error('At least RES stage is required');
```
### Expected Behavior
No error
### Current Behavior
```bash
➜ pipeline-ci-cd-wrapper git:(main) npx dotenv-cli -- npm run cdk deploy -- --all --region ${AWS_REGION} --profile $RES_ACCOUNT_AWS_PROFILE --qualifier ${CDK_QUALIFIER}
> pipeline-ci-cd-wrapper@0.1.0 cdk
> cdk deploy --all --region eu-west-1 --profile res --qualifier hnb659fds
/Users/julian/dev/pipeline-ci-cd-wrapper/node_modules/@cdklabs/cdk-cicd-wrapper/src/stacks/PipelineBlueprint.ts:519
throw new Error('At least RES stage is required');
^
Error: At least RES stage is required
at PipelineBlueprintBuilder.generateDeploymentDefinitions (/Users/julian/dev/pipeline-ci-cd-wrapper/node_modules/@cdklabs/cdk-cicd-wrapper/src/stacks/PipelineBlueprint.ts:519:13)
at PipelineBlueprintBuilder.synth (/Users/julian/dev/pipeline-ci-cd-wrapper/node_modules/@cdklabs/cdk-cicd-wrapper/src/stacks/PipelineBlueprint.ts:442:44)
at Object. (/Users/julian/dev/pipeline-ci-cd-wrapper/bin/pipeline-ci-cd-wrapper.ts:19:4)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module.m._compile (/Users/julian/dev/pipeline-ci-cd-wrapper/node_modules/ts-node/src/index.ts:1618:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Object.require.extensions. [as .ts] (/Users/julian/dev/pipeline-ci-cd-wrapper/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Function.Module._load (node:internal/modules/cjs/loader:1019:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
Subprocess exited with error 1
```
### Reproduction Steps
Define PROD stage as described in the documentation:
```ts
PipelineBlueprint.builder().defineStages([Stage.DEV, Stage.INT, Stage.PROD]).addStack({
provide: (context) => {
// Create your stacks here
new PipelineCiCdWrapperStack(context.scope, `${context.blueprintProps.applicationName}PipelineCiCdWrapperStack`);
}
}).synth(app);
```
See sample repo: https://github.com/jumic/pipeline-ci-cd-wrapper
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### CDK CI/CD Wrapper version used
latest
### Environment details (OS name and version, etc.)
macOS 15.3.1
Contributor guide
Assessment
This issue has not been assessed yet.