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 support setting driverOpts for buildx #1704

Merged
merged 2 commits into from
Jan 7, 2024

Conversation

Hellspam
Copy link
Contributor

@Hellspam Hellspam commented Aug 21, 2023

I recently had a use case where I wanted to change the builder image name to use an image from our local Artifactory instance.

To do that with the builder, I needed to add support for driverOpts to set --driver-opt image=MY_IMAGE. Tested locally, seems to work fine.

Regarding testing - I did not see any tests currently verifying the buildx create.

https://docs.docker.com/engine/reference/commandline/buildx_create/#driver-opt

@rohanKanojia
Copy link
Member

I think you should be able to add an integration test project in it/ folder with maven executions.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

23.1% 23.1% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@rohanKanojia
Copy link
Member

@Hellspam : polite ping, are you still working on this?

Hellspam and others added 2 commits January 6, 2024 11:27
Signed-off-by: Roy Arnon <roy.a@taboola.com>
…builder

+ Add BuildXServiceCreateBuilderTest for verifying --driver-opt flag is
  passed while creating builder
+ Add buildx-driver-opt integration test

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@rohanKanojia rohanKanojia force-pushed the add-buildx-driveropts branch from c22587f to 1ea1004 Compare January 6, 2024 07:12
Copy link

codecov bot commented Jan 6, 2024

Codecov Report

Merging #1704 (1ea1004) into master (088aa46) will increase coverage by 0.01%.
The diff coverage is 71.42%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1704      +/-   ##
============================================
+ Coverage     65.31%   65.33%   +0.01%     
- Complexity     2280     2284       +4     
============================================
  Files           172      172              
  Lines         10184    10191       +7     
  Branches       1406     1408       +2     
============================================
+ Hits           6652     6658       +6     
  Misses         2983     2983              
- Partials        549      550       +1     
Files Coverage Δ
...bric8/maven/docker/config/BuildXConfiguration.java 96.07% <80.00%> (-1.75%) ⬇️
...io/fabric8/maven/docker/service/BuildXService.java 76.88% <50.00%> (+0.25%) ⬆️

Copy link

sonarqubecloud bot commented Jan 6, 2024

@rohanKanojia rohanKanojia merged commit 478b930 into fabric8io:master Jan 7, 2024
10 checks passed
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.

2 participants