-
Notifications
You must be signed in to change notification settings - Fork 644
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
feature: Add the possibility to give secret to buildx build (#1798) #1799
feature: Add the possibility to give secret to buildx build (#1798) #1799
Conversation
@kevinleturc : Could you please add a line to doc/changelog.md regarding this change? Do you think it's possible to add an integration test for this feature? |
Sure
I will check that. |
95cf1c7
to
bb3a237
Compare
…o#1798) Signed-off-by: Kevin Leturc <[email protected]>
bb3a237
to
dc7a0d7
Compare
Hi @rohanKanojia, I added the changelog line and an it test. For the it test, I ran into the following error in E2E Tests at the beginning:
In order to fix this error, I needed to use BuildKit, and so edit the
Which, in my opinion, is a valid usage of the plugin. But, I don't know if such case could work on the docker buildx driver with some GitHub runner configuration, and so revert the change on What do think? |
@kevinleturc : You're right. Adding not null checks for each field might be difficult to keep up with in the future. Do you think we can introduce something like docker-maven-plugin/src/main/java/io/fabric8/maven/docker/config/BuildXConfiguration.java Line 108 in e980189
|
@@ -86,7 +92,7 @@ public String getCacheTo() { | |||
} | |||
|
|||
public boolean isBuildX() { | |||
return !getPlatforms().isEmpty(); | |||
return !getPlatforms().isEmpty() || hasSecret(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is okay for now but we need to improve this in the future.
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1799 +/- ##
============================================
+ Coverage 65.87% 66.05% +0.17%
- Complexity 2306 2321 +15
============================================
Files 172 173 +1
Lines 10194 10245 +51
Branches 1408 1416 +8
============================================
+ Hits 6715 6767 +52
+ Misses 2926 2921 -5
- Partials 553 557 +4
|
Yes exactly, something like the current isBuildX but whitout having to state every fields. This should be possible if upper logic juste check buildx nullity to do the buildx things instead of checking if there's more than 1 platform. I can prepare a PR for this, maybe outside of this one? I can work on that by the beginning of the week, if everything is ok for you? |
@kevinleturc : Thanks a lot! |
Fix #1798