Skip to content
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

Add source policies for build #11325

Merged
merged 1 commit into from Jan 10, 2024
Merged

Add source policies for build #11325

merged 1 commit into from Jan 10, 2024

Conversation

cpuguy83
Copy link
Contributor

@cpuguy83 cpuguy83 commented Jan 8, 2024

Build{x,kit} support passing in source policies via an (experimental) env var.
This change adds those policies to the build request.

Equivalent code in buildx build
https://github.com/docker/buildx/blob/7c590ecb9a8005d7b9e8f4ef7217130d79310200/commands/build.go#L144-L147

ReadSourcePolicy code:
https://github.com/docker/buildx/blob/7c590ecb9a8005d7b9e8f4ef7217130d79310200/build/build.go#L1502-L1525

Build{x,kit} support passing in source policies via an (expirimental)
env var.
This change adds those policies to the build request.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@joshspicer
Copy link

+1 My team is hoping to take advantage of buildkit source policies + compose

Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (f659918) 56.57% compared to head (6d41613) 56.54%.
Report is 2 commits behind head on main.

Files Patch % Lines
pkg/compose/build.go 85.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11325      +/-   ##
==========================================
- Coverage   56.57%   56.54%   -0.03%     
==========================================
  Files         134      134              
  Lines       11454    11459       +5     
==========================================
  Hits         6480     6480              
- Misses       4351     4353       +2     
- Partials      623      626       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ndeloof ndeloof merged commit 2bf2b22 into docker:main Jan 10, 2024
26 checks passed
@cpuguy83 cpuguy83 deleted the source_policy branch March 28, 2024 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants