Skip to content

Commit 5f56522

Browse files
committed
Add environmentVariables property to PullRequestCheckProps
1 parent 75e3273 commit 5f56522

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

Lines changed: 10 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 } from '@aws-cdk/aws-codebuild';
2+
import { BuildSpec, ComputeType, IBuildImage, LinuxBuildImage, Project, Source, BuildEnvironmentVariable } 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';
@@ -102,6 +102,13 @@ export interface PullRequestCheckProps {
102102
* @default true
103103
*/
104104
readonly allowAllOutbound?: boolean;
105+
106+
/**
107+
* The environment variables that your builds can use.
108+
*/
109+
readonly environmentVariables?: {
110+
[name: string]: BuildEnvironmentVariable;
111+
};
105112
}
106113

107114
/**
@@ -127,6 +134,7 @@ export class PullRequestCheck extends Construct {
127134
subnetSelection,
128135
securityGroups,
129136
allowAllOutbound,
137+
environmentVariables,
130138
} = props;
131139

132140
this.pullRequestProject = new Project(this, 'PullRequestProject', {
@@ -138,6 +146,7 @@ export class PullRequestCheck extends Construct {
138146
buildImage,
139147
computeType,
140148
privileged,
149+
environmentVariables,
141150
},
142151
buildSpec,
143152
role,

0 commit comments

Comments
 (0)