@@ -2,6 +2,25 @@ import { Component, github, javascript } from 'projen';
2
2
3
3
const NOT_FLAGGED_EXPR = "!contains(github.event.pull_request.labels.*.name, 'pr/exempt-integ-test')" ;
4
4
5
+ /**
6
+ * Options for atmosphere service usage.
7
+ */
8
+ export interface AtmosphereOptions {
9
+ /**
10
+ * Atmosphere service endpoint.
11
+ */
12
+ readonly endpoint : string ;
13
+ /**
14
+ * Which pool to retrieve environments from.
15
+ */
16
+ readonly pool : string ;
17
+ /**
18
+ * OIDC role to assume prior to using atmosphere. Must be allow listed
19
+ * on the service endpoint.
20
+ */
21
+ readonly oidcRoleArn : string ;
22
+ }
23
+
5
24
export interface CdkCliIntegTestsWorkflowProps {
6
25
/**
7
26
* Runners for the workflow
@@ -49,6 +68,13 @@ export interface CdkCliIntegTestsWorkflowProps {
49
68
* @default - No upstream versions
50
69
*/
51
70
readonly allowUpstreamVersions ?: string [ ] ;
71
+
72
+ /**
73
+ * Enable atmosphere service to retrieve AWS test environments.
74
+ *
75
+ * @default - atmosphere is not used
76
+ */
77
+ readonly enableAtmosphere ?: AtmosphereOptions ;
52
78
}
53
79
54
80
/**
@@ -286,7 +312,7 @@ export class CdkCliIntegTestsWorkflow extends Component {
286
312
'aws-region' : 'us-east-1' ,
287
313
'role-duration-seconds' : 4 * 60 * 60 ,
288
314
// Expect this in Environment Variables
289
- 'role-to-assume' : '${{ vars.AWS_ROLE_TO_ASSUME_FOR_TESTING }}' ,
315
+ 'role-to-assume' : props . enableAtmosphere ? props . enableAtmosphere . oidcRoleArn : '${{ vars.AWS_ROLE_TO_ASSUME_FOR_TESTING }}' ,
290
316
'role-session-name' : 'run-tests@aws-cdk-cli-integ' ,
291
317
'output-credentials' : true ,
292
318
} ,
@@ -361,13 +387,19 @@ export class CdkCliIntegTestsWorkflow extends Component {
361
387
'bin/run-suite --use-cli-release=${{ steps.versions.outputs.cli_version }} --framework-version=${{ steps.versions.outputs.lib_version }} ${{ matrix.suite }}' ,
362
388
] . join ( '\n' ) ,
363
389
env : {
364
- // Concurrency only for long-running cli-integ-tests
365
- JEST_TEST_CONCURRENT : "${{ matrix.suite == 'cli-integ-tests' && 'true' || 'false' }}" ,
366
390
JSII_SILENCE_WARNING_DEPRECATED_NODE_VERSION : 'true' ,
367
391
JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION : 'true' ,
368
392
JSII_SILENCE_WARNING_KNOWN_BROKEN_NODE_VERSION : 'true' ,
369
393
DOCKERHUB_DISABLED : 'true' ,
370
- AWS_REGIONS : [ 'us-east-2' , 'eu-west-1' , 'eu-north-1' , 'ap-northeast-1' , 'ap-south-1' ] . join ( ',' ) ,
394
+ ...( props . enableAtmosphere ?
395
+ {
396
+ CDK_INTEG_ATMOSPHERE_ENABLED : 'true' ,
397
+ CDK_INTEG_ATMOSPHERE_ENDPOINT : props . enableAtmosphere . endpoint ,
398
+ CDK_INTEG_ATMOSPHERE_POOL : props . enableAtmosphere . pool ,
399
+ } :
400
+ {
401
+ AWS_REGIONS : [ 'us-east-2' , 'eu-west-1' , 'eu-north-1' , 'ap-northeast-1' , 'ap-south-1' ] . join ( ',' ) ,
402
+ } ) ,
371
403
CDK_MAJOR_VERSION : '2' ,
372
404
RELEASE_TAG : 'latest' ,
373
405
GITHUB_TOKEN : '${{ secrets.GITHUB_TOKEN }}' ,
0 commit comments