-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
cdk.pipelines - Allow the configuration of Caching properties for Synth CodebuildProject #16375
Comments
What is missing from |
@rix0rrr straightforward access to the CodeBuild project. The BuildSpec by itself is not sufficient. |
@rix0rrr , a way to set caching for the codebuild project, but actually, as @gshpychka said, just being able to access the codebuild project directly would be very helpul. |
Would a single API that specifies both the I'm thinking of something like: new CodeBuildStep('Step', {
// Local
caching: CodeBuildCaching.local({
source: true,
docker: true,
paths: ['~/.m2', '~/.npm'],
}),
// S3
caching: CodeBuildCaching.s3(myBucket, {
prefix: 'buildcache/',
paths: ['~/.m2', '~/.npm'],
}),
}); |
@rix0rrr that would cover my use case, for what it's worth. But access to the codebuild project would still be useful, to get access to other features like logging. |
Right now for what i'm doing just being able to set cache setting is helpful. But, i think being able to access the underlying code build project, would be the most flexible solution.. For example I've got something in mind coming up soon, where i'd probably want to attach the project to a vpc, so it can do some lookups of things that are not AWS specific. I want to be able to do a look up of some 'outside world' things that will influence my build. ( in my case, it will be a list of sensors that are part of an IOT installation ) |
Attaching to a VPC is already possible today, as is influencing the IAM permissions. By the way, you can always access And for more customized cases, you can implement an FWIW, the "this code creates mostly what I need except this one property..." problem crops up a lot more in CDK. I don't think the solution should be "let's just keep adding properties everywhere". Although I don't have the full solution yet either... |
@rix0rrr thanks. Does this mean that |
FWIW, the "this code creates mostly what I need except this one property..." problem Yes, murphy's law is that its always that one property that is'tn there. :-) I agree with you, that adding more propertys is not really a scalable solution to the general problem.. If your contruct starts specifiying 'propertys' of a an underlying reoource the construct, ( rather than the resource itself ), then it woudl always be desirable that there is an 'easy' way to acces that resource.. if this coudl be done as a 'general' thing. ( thats a big ask i know ) then all the 'mostly want i need' problems go away. |
While that's true, the problem is exacerbated by the lack of access to encapsulated resources. Just being able to get a reference to the underlying project would allow users to make tweaks without needing to keep expanding the API of higher level constructs. Between expanding the API to cover caching use-cases and exposing the underlying project that is encapsulated, which would you prefer @rix0rrr? I've run into at least half a dozen issues when trying to setup CI/CD pipelines using CodeStar/CodeBuild/CodeArtifacts/CodePipeline. Some problems can be worked around by using CFN escape hatches, but others encapsulate so much that it's hard to get at things and I end up re-implementing constructs entirely. |
My two cents are that implementing an aws-cdk/packages/@aws-cdk/pipelines/lib/codepipeline/_codebuild-factory.ts Lines 269 to 271 in ebba618
|
Fixes #16375 Closes #19084 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Fixes aws#16375 Closes aws#19084 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
It would be helpful to add the abillity to set caching for the synth code build project in a pipeline. This will help with speed up the build and run times of pipelines. I have achived the desired result by using escape hatches but this is not particaully elegent and could be improved with some minor work.
The text was updated successfully, but these errors were encountered: