feat(ecr-assets): add support for docker build context#36930
feat(ecr-assets): add support for docker build context#36930mergify[bot] merged 1 commit intoaws:mainfrom
Conversation
|
|
||||||||||||||
|
|
||||||||||||||
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
520b1c1 to
329214b
Compare
1b3bd62 to
a60f41a
Compare
a60f41a to
24a6f37
Compare
|
aws/aws-cdk-cli#1128 has been merged and released: Updated this PR to depend on the latest versions. |
aad409c to
91f648b
Compare
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
91f648b to
9ebaa8e
Compare
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
1 similar comment
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
9ebaa8e to
2689219
Compare
mrgrain
left a comment
There was a problem hiding this comment.
@cogwirrel Happy with this once the build passes. Thanks for the contribution! Might be easier to split the package updates out into a separate PR. Feel free to ping me internally to move this forward.
…de docker build context (#37350) ### Issue # (if applicable) References #31598 ### Reason for this change Splitting dependency updates out of #36930 ### Description of changes Update the following dependencies: - @aws-cdk/integ-runner: ^2.196.1 -> ^2.197.1 - @aws-cdk/cloud-assembly-api: ^2.1.1 -> ^2.2.0 - @aws-cdk/cloud-assembly-schema: ^52.1.0 -> ^53.0.0 - yarn.lock transitive dependency updates Fix the integration tests due to the update. Details below from our friend Kiro: > The PR that introduced the @aws-cdk/aws-eks:useNativeOidcProvider feature flag is #36589 > This PR added the EKS_USE_NATIVE_OIDC_PROVIDER flag with `recommendedValue: true`. Because it's a recommended flag, it was automatically included in the `@aws-cdk/integ-runner`'s auto-generated `recommended-feature-flags.json` when the integ-runner was built against a version of aws-cdk-lib containing this change. This is why `@aws-cdk/[email protected]` includes the flag but `@aws-cdk/[email protected]` does not — `v2.197.1` was the first integ-runner release built after PR #36589 was merged. ### Describe any new or updated permissions being added None ### Description of how you validated changes #36930 ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Add support for docker's --build-context flag in docker builds. Fixes aws#31598
ae42ed4 to
6afbb85
Compare
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Merge Queue Status
This pull request spent 6 seconds in the queue, with no time running CI. Required conditions to merge
|
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Fixes #31598
Reason for this change
Add support for docker's
--build-contextflag in docker builds. This is useful for a few reasons outlined in the linked issue (and other similar issues), such as:docker-image://alpine:latest)Description of changes
Adds support for Docker's
--build-contextflag when building Docker image assets. This allows users to specify additional named build contexts that can be referenced in Dockerfiles viaCOPY --from=<name>.buildContexts(optionalRecord<string, string>) toDockerBuildOptions,DockerImageAssetOptions,DockerImageAssetInvalidationOptions, andDockerImageAssetSourceDockerImage.fromBuild()to pass--build-context key=valueflags to the docker build commandbuildContextsthrough the full asset pipeline:DockerImageAsset→ synthesizer → asset manifest → cloud assembly schemabuildContextskeys and values (same asbuildArgs)buildContextsto asset hash invalidation (controllable viainvalidation.buildContexts)ASSET_RESOURCE_METADATA_DOCKER_BUILD_CONTEXTS_KEYmetadata constantaws-ecr-assetsREADME with documentation and usage exampleIn terms of design decisions, this follows the same pattern as
buildArgs.The necessary changes to the CLI have been released: aws/aws-cdk-cli#1128
Describe any new or updated permissions being added
N/A
Description of how you validated changes
Integration test
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license