Skip to content

Commit ebbc3c7

Browse files
authored
Merge pull request #120 from mbp/add-artifact-property-to-pull-request-check
feat: Add artifacts property to PullRequestCheckProps.
2 parents 1f7e1d3 + 2a9edc4 commit ebbc3c7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/cdk-pull-request-check/src/pull-request-check.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as path from 'path';
2-
import { BuildSpec, ComputeType, IBuildImage, LinuxBuildImage, Project, Source, BuildEnvironmentVariable } from '@aws-cdk/aws-codebuild';
2+
import { BuildSpec, ComputeType, IBuildImage, LinuxBuildImage, Project, Source, BuildEnvironmentVariable, IArtifacts } from '@aws-cdk/aws-codebuild';
33
import { IRepository } from '@aws-cdk/aws-codecommit';
44
import { IVpc, SubnetSelection, ISecurityGroup } from '@aws-cdk/aws-ec2';
55
import { EventField, RuleTargetInput, OnEventOptions, Rule } from '@aws-cdk/aws-events';
@@ -109,6 +109,15 @@ export interface PullRequestCheckProps {
109109
readonly environmentVariables?: {
110110
[name: string]: BuildEnvironmentVariable;
111111
};
112+
113+
/**
114+
* Defines where build artifacts will be stored.
115+
*
116+
* Could be: PipelineBuildArtifacts, NoArtifacts and S3Artifacts.
117+
*
118+
* @default NoArtifacts
119+
*/
120+
readonly artifacts?: IArtifacts;
112121
}
113122

114123
/**
@@ -135,6 +144,7 @@ export class PullRequestCheck extends Construct {
135144
securityGroups,
136145
allowAllOutbound,
137146
environmentVariables,
147+
artifacts
138148
} = props;
139149

140150
this.pullRequestProject = new Project(this, 'PullRequestProject', {
@@ -154,6 +164,7 @@ export class PullRequestCheck extends Construct {
154164
subnetSelection,
155165
securityGroups,
156166
allowAllOutbound,
167+
artifacts
157168
});
158169

159170
if (updateApprovalState || postComment) {

0 commit comments

Comments
 (0)