Open5
QUEUED実行タイプのCodePipelinev2の機能フラグが有効でCDKデプロイも成功するのにtestで警告が出る
QUEUED execution mode can only be used with V2 pipelines, `PipelineType.V2` must be specified for `pipelineType`
Type: PipelineType (optional, default: PipelineType.V2 if the feature flag CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2 is true, PipelineType.V1 otherwise)
cdk.json
...
"context": {
...
"@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true,
...
デプロイOK
テストOK
test-stack.ts
const codePipeline = new codepipeline.Pipeline(this, 'Pipeline', {
executionMode: codepipeline.ExecutionMode.QUEUED,
pipelineType: codepipeline.PipelineType.V2,
});
デプロイOK
テストNG
test-stack.ts
const codePipeline = new codepipeline.Pipeline(this, 'Pipeline', {
executionMode: codepipeline.ExecutionMode.QUEUED,
// pipelineType: codepipeline.PipelineType.V2,
});
test.ts
test('snapshot test', () => {
const app = new cdk.App();
const testStack = new TestStack(app, 'TestStack');
const template = Template.fromStack(testStack);
expect(template).toMatchSnapshot();
});
cdk --version
2.164.1