-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
integ-runner: Support custom toolkit stacks #25821
Comments
Thanks for reporting this feature request, I don't think we currently support this, and it would be useful to have in lots of cases I can imagine! |
You should be able to do this by using the Like this. new IntegTest(app, 'integ-test', {
cdkCommands: {
deploy: {
args: {
toolkitStackName: 'my-custom-name',
},
},
},
}); |
@corymhall I have tried setting that, but the result is the same reference to the default SSM Parameter path |
@idwagner are you adding the qualifier in the stack synthesizer in your integ test? const stack = new Stack(app, 'integ-test-stack', {
synthesizer: new DefaultStackSynthesizer({
qualifier: '2',
}),
}); |
@corymhall Yes, and in the output I see this, showing the correct qualifier: |
@idwagner ah ok it because the test is running the update workflow which means it is deploying the existing snapshot first. You will have to run with |
Thanks @corymhall I was able to get this to work. I wasn't aware it was using the custom args from the pre-update snapshot for its deploy. In the case where we may want to have a fork workflow where contributors would be deploying the tests in a different AWS account than the upstream repository, are there any ways to override account specific information such as account id's which may be captured in the snapshots? |
What we recommend is to use environment agnostic stacks in your integ tests so that there is no environment specific information. If some tests require the environment to be set then you can use this pattern. The aws-cdk/packages/aws-cdk-lib/aws-ec2/test/integ.nat-instances.lit.ts Lines 29 to 34 in 0006aa7
|
|
Edit: Shortly after posting this I found that the synthesizer/qualifier also needs set in After looking at the source for
Original post: Was there ever an actual resolution to this? The
tried overriding it in a root
run with
results in:
using versions:
If this issue is going to be marked |
@jvalore-medallia I found through a fair amount of time of troubleshooting that you also need to create and provide a separate |
Describe the feature
We would like to use the integ-runner tool for deploying integration tests, however our environment uses a custom bootstrapping, which includes a custom toolkit stack name.
The integ-runner tool does not appear to currently allow you to set the same
--toolkit-stack-name
option that you can with a normalcdk deploy
.Use Case
We would like to use integ-runner in environments that have a customized cdk bootstrap, which work correctly with a normal
cdk deploy
Proposed Solution
No response
Other Information
In our specific case, our bootstrap uses a qualifier of
2
, which puts the bootstrap ssm parameters in/cdk-bootstrap/2/stack_name
and/cdk-bootstrap/2/version
. We also have a custom named fileAssetBucket, and use a custom synthesizer which defines both the bucket and qualifier.Acknowledgements
CDK version used
2.80.0
Environment details (OS name and version, etc.)
debian bullseye (docker/CI environment)
The text was updated successfully, but these errors were encountered: