Skip to content

Commit b110e59

Browse files
committed
integ
tweak tweak
1 parent 9f815ee commit b110e59

File tree

5 files changed

+41
-0
lines changed

5 files changed

+41
-0
lines changed

packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,28 @@ class DockerStackWithCustomFile extends cdk.Stack {
707707
}
708708
}
709709

710+
class MultipleDockerImagesStack extends cdk.Stack {
711+
constructor(parent, id, props) {
712+
super(parent, id, props);
713+
714+
new docker.DockerImageAsset(this, 'image1', {
715+
directory: path.join(__dirname, 'docker-concurrent/image1')
716+
});
717+
new docker.DockerImageAsset(this, 'image2', {
718+
directory: path.join(__dirname, 'docker-concurrent/image2')
719+
});
720+
new docker.DockerImageAsset(this, 'image3', {
721+
directory: path.join(__dirname, 'docker-concurrent/image3')
722+
});
723+
724+
// Add at least a single resource (WaitConditionHandle), otherwise this stack will never
725+
// be deployed (and its assets never built)
726+
new cdk.CfnResource(this, 'Handle', {
727+
type: 'AWS::CloudFormation::WaitConditionHandle'
728+
});
729+
}
730+
}
731+
710732
/**
711733
* A stack that will never succeed deploying (done in a way that CDK cannot detect but CFN will complain about)
712734
*/
@@ -921,6 +943,7 @@ switch (stackSet) {
921943
new DockerStack(app, `${stackPrefix}-docker`);
922944
new DockerInUseStack(app, `${stackPrefix}-docker-in-use`);
923945
new DockerStackWithCustomFile(app, `${stackPrefix}-docker-with-custom-file`);
946+
new MultipleDockerImagesStack(app, `${stackPrefix}-multiple-docker-images`);
924947

925948
new NotificationArnsStack(app, `${stackPrefix}-notification-arns`);
926949

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM public.ecr.aws/docker/library/alpine:latest
2+
RUN echo "image1"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM public.ecr.aws/docker/library/alpine:latest
2+
RUN echo "image2"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM public.ecr.aws/docker/library/alpine:latest
2+
RUN echo "image3"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { integTest, withDefaultFixture } from '../../../lib';
2+
3+
jest.setTimeout(2 * 60 * 60_000);
4+
5+
integTest(
6+
'deploy stack with multiple docker assets',
7+
withDefaultFixture(async (fixture) => {
8+
await fixture.cdkDeploy('multiple-docker-images', {
9+
options: ['--asset-parallelism', '--asset-build-concurrency', '3'],
10+
});
11+
}),
12+
);

0 commit comments

Comments
 (0)