Skip to content

Commit be1d2a5

Browse files
author
Abdelhalim Dadouche
committed
removing warning :
[Warning at /biga-build-image/BuildImagePipeline] V1 pipeline type is implicitly selected when `pipelineType` is not set. If you want to use V2 type, set `PipelineType.V2`. [ack: @aws-cdk/aws-codepipeline:unspecifiedPipelineType] [Warning at /biga-build-ec2-ami/EmbeddedLinuxPipeline] V1 pipeline type is implicitly selected when `pipelineType` is not set. If you want to use V2 type, set `PipelineType.V2`. [ack: @aws-cdk/aws-codepipeline:unspecifiedPipelineType] [Warning at /biga-build-nxp-goldbox/EmbeddedLinuxPipeline] V1 pipeline type is implicitly selected when `pipelineType` is not set. If you want to use V2 type, set `PipelineType.V2`. [ack: @aws-cdk/aws-codepipeline:unspecifiedPipelineType]
1 parent b480090 commit be1d2a5

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

lib/build-image-data.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ export class BuildImageDataStack extends cdk.Stack {
3737
*/
3838
private createDeploymentBucket(bucketName: string): s3.IBucket {
3939
const accessLoggingBucket = new s3.Bucket(this, 'LoggingBucket', {
40-
versioned: true,
40+
versioned: false,
4141
enforceSSL: true,
42+
autoDeleteObjects: true,
43+
removalPolicy: RemovalPolicy.DESTROY,
4244
});
4345

4446
const encryptionKey = new kms.Key(this, 'PipelineArtifactKey', {

lib/build-image-pipeline.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ export class BuildImagePipelineStack extends cdk.Stack {
9999
});
100100

101101
const accessLoggingBucket = new s3.Bucket(this, 'ArtifactAccessLogging', {
102-
versioned: true,
102+
versioned: false,
103103
enforceSSL: true,
104+
autoDeleteObjects: true,
105+
removalPolicy: RemovalPolicy.DESTROY,
104106
});
105107
const encryptionKey = new kms.Key(this, 'PipelineArtifactKey', {
106108
removalPolicy: RemovalPolicy.DESTROY,
@@ -115,11 +117,14 @@ export class BuildImagePipelineStack extends cdk.Stack {
115117
blockPublicAccess: new s3.BlockPublicAccess(
116118
s3.BlockPublicAccess.BLOCK_ALL
117119
),
120+
autoDeleteObjects: true,
121+
removalPolicy: RemovalPolicy.DESTROY,
118122
});
119123

120124
const pipeline = new codepipeline.Pipeline(this, 'BuildImagePipeline', {
121125
artifactBucket,
122126
pipelineName: `${props.imageKind}BuildImagePipeline`,
127+
pipelineType: codepipeline.PipelineType.V1,
123128
stages: [
124129
{
125130
stageName: 'Source',

lib/embedded-linux-pipeline.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ export class EmbeddedLinuxPipelineStack extends cdk.Stack {
8282
let scriptAsset!: Asset;
8383

8484
const accessLoggingBucket = new s3.Bucket(this, 'ArtifactAccessLogging', {
85-
versioned: true,
85+
versioned: false,
8686
enforceSSL: true,
87+
autoDeleteObjects: true,
88+
removalPolicy: RemovalPolicy.DESTROY,
8789
});
8890

8991
if (props.projectKind && props.projectKind == ProjectKind.PokyAmi) {
@@ -106,6 +108,8 @@ export class EmbeddedLinuxPipelineStack extends cdk.Stack {
106108
encryptionKey: outputBucketEncryptionKey,
107109
encryptionKeyArn: outputBucketEncryptionKey.keyArn,
108110
serverAccessLogsBucket: accessLoggingBucket,
111+
autoDeleteObjects: true,
112+
removalPolicy: RemovalPolicy.DESTROY,
109113
});
110114
environmentVariables = {
111115
IMPORT_BUCKET: {
@@ -126,6 +130,8 @@ export class EmbeddedLinuxPipelineStack extends cdk.Stack {
126130
versioned: true,
127131
enforceSSL: true,
128132
serverAccessLogsBucket: accessLoggingBucket,
133+
autoDeleteObjects: true,
134+
removalPolicy: RemovalPolicy.DESTROY,
129135
});
130136
}
131137

@@ -142,6 +148,8 @@ export class EmbeddedLinuxPipelineStack extends cdk.Stack {
142148
blockPublicAccess: new s3.BlockPublicAccess(
143149
s3.BlockPublicAccess.BLOCK_ALL
144150
),
151+
autoDeleteObjects: true,
152+
removalPolicy: RemovalPolicy.DESTROY,
145153
});
146154

147155
/** Create our CodePipeline Actions. */
@@ -295,6 +303,7 @@ def handler(event, context):
295303
const pipeline = new codepipeline.Pipeline(this, 'EmbeddedLinuxPipeline', {
296304
artifactBucket,
297305
restartExecutionOnUpdate: true,
306+
pipelineType: codepipeline.PipelineType.V1,
298307
stages: [
299308
{
300309
stageName: 'Source',

0 commit comments

Comments
 (0)