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

pushDockerImage should throw an exception if pushing image fails #309

Open
tgeens opened this issue May 22, 2023 · 1 comment
Open

pushDockerImage should throw an exception if pushing image fails #309

tgeens opened this issue May 22, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@tgeens
Copy link
Contributor

tgeens commented May 22, 2023

Steps to reproduce:
./gradlew pushDockerImage --debug without necessary credentials

Actual:
BUILD SUCCESSFUL without any image actually pushed

Expected:
BUILD FAILED
bonus points for why it failed

Build output:

...
2023-05-22T12:08:59.880+0200 [DEBUG] [com.bmuschko.gradle.docker.shaded.org.apache.hc.client5.http.wire] http-outgoing-8 >> "POST /images/ghcr.io%2Fxenit-eu%2F[redacted]:0.1.0-SNAPSHOT/push HTTP/1.1[\r][\n]"
2023-05-22T12:08:59.880+0200 [DEBUG] [com.bmuschko.gradle.docker.shaded.org.apache.hc.client5.http.wire] http-outgoing-8 >> "X-Registry-Auth: eyJ1c2VybmFtZSI6bnVsbCwicGFzc3dvcmQiOm51bGwsImVtYWlsIjpudWxsLCJzZXJ2ZXJhZGRyZXNzIjoiaHR0cHM6Ly9pbmRleC5kb2NrZXIuaW8vdjEvIiwiYXV0aCI6bnVsbCwicmVnaXN0cnl0b2tlbiI6bnVsbCwiaWRlbnRpdHl0b2tlbiI6bnVsbCwic3RhY2tPcmNoZXN0cmF0b3IiOm51bGx9[\r][\n]"

...
2023-05-22T12:09:00.724+0200 [DEBUG] [com.bmuschko.gradle.docker.shaded.org.apache.hc.client5.http.wire] http-outgoing-8 << "{"errorDetail":{"message":"unauthorized: unauthenticated: User cannot be authenticated with the token provided."},"error":"unauthorized: unauthenticated: User cannot be authenticated with the token provided."}[\r][\n]"
...
2023-05-22T12:09:00.725+0200 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Execute start for :pushDockerImage'
2023-05-22T12:09:00.726+0200 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Executing task ':pushDockerImage''
...
2023-05-22T12:09:00.732+0200 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 
2023-05-22T12:09:00.732+0200 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] BUILD SUCCESSFUL in 3s
@vierbergenlars
Copy link
Member

This should be fixed in com.bmuschko:gradle-docker-plugin:9.3.2, so we would need to update to that version

@vierbergenlars vierbergenlars added the bug Something isn't working label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants