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

fix: multi-arch build should use provided repository #1629

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

merikan
Copy link
Contributor

@merikan merikan commented Jan 4, 2023

repository should be used when pushing multi-arch images with buildx.

repository (config and docker.push.registry)was ignored when using buildx and instead, the default Docker Hub was used and yielded the the following error error: failed to solve: server message: insufficient_scope: authorization failed

Fixes #1597 #1593

Signed-off-by: Peter Merikan [email protected]

@rohanKanojia
Copy link
Member

Is it possible to add a test to verify fix is working as expected?

@merikan
Copy link
Contributor Author

merikan commented Jan 4, 2023

My first thought was to do a similar test as for "classic" push but I didn't find any tests for it. So I took the easy way and completely skipped the tests. Right now I have a lot at work, but hopefully I'll have time to give it a try this weekend.

@merikan
Copy link
Contributor Author

merikan commented Jan 8, 2023

@rohanKanojia I added some tests for pushing both classic and buildx

@codecov
Copy link

codecov bot commented Jan 12, 2023

Codecov Report

Merging #1629 (d35c7bf) into master (e98022a) will increase coverage by 0.10%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #1629      +/-   ##
============================================
+ Coverage     63.66%   63.76%   +0.10%     
- Complexity     2173     2177       +4     
============================================
  Files           170      170              
  Lines          9926     9926              
  Branches       1361     1361              
============================================
+ Hits           6319     6329      +10     
+ Misses         3078     3064      -14     
- Partials        529      533       +4     
Impacted Files Coverage Δ
...c/main/java/io/fabric8/maven/docker/BuildMojo.java 39.56% <100.00%> (ø)
...io/fabric8/maven/docker/service/BuildXService.java 71.01% <100.00%> (ø)
.../fabric8/maven/docker/service/RegistryService.java 80.72% <100.00%> (ø)
...o/fabric8/maven/docker/util/AuthConfigFactory.java 70.35% <0.00%> (ø)
.../io/fabric8/maven/docker/service/BuildService.java 63.95% <0.00%> (+0.77%) ⬆️
.../maven/docker/access/DockerConnectionDetector.java 68.00% <0.00%> (+4.00%) ⬆️
...ric8/maven/docker/access/util/LocalSocketUtil.java 20.00% <0.00%> (+20.00%) ⬆️
...io/fabric8/maven/docker/util/SuffixFileFilter.java 100.00% <0.00%> (+100.00%) ⬆️

@sonarcloud
Copy link

sonarcloud bot commented Jan 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@rohanKanojia rohanKanojia merged commit 01c0b85 into fabric8io:master Jan 12, 2023
@merikan
Copy link
Contributor Author

merikan commented Feb 3, 2023

Hi @rohanKanojia, do you have a date for the next release/patch, 0.40.4?

@merikan merikan deleted the buildx_repository branch February 3, 2023 07:35
@rohanKanojia
Copy link
Member

@merikan : Thanks a lot for reaching out, Let me cut a new release this weekend.

@rohanKanojia
Copy link
Member

@merikan : I have released 0.41.0, Would be awesome if you could verify your use case and provide feedback.

@Zialus
Copy link

Zialus commented Feb 7, 2023

Pushing respects <docker.push.registry>

but pulling doesn't respect <docker.registry>

@rohanKanojia
Copy link
Member

@Zialus : Could you please create a new issue for this?

@Zialus
Copy link

Zialus commented Feb 12, 2023

@rohanKanojia done :)

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.

buildx push ignores <repository> tag in build
3 participants