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

quarkus.container-image.push is ignored with buildpacks #23844

Closed
lordofthejars opened this issue Feb 21, 2022 · 12 comments · Fixed by #23880 or #24947
Closed

quarkus.container-image.push is ignored with buildpacks #23844

lordofthejars opened this issue Feb 21, 2022 · 12 comments · Fixed by #23880 or #24947
Assignees
Labels
area/kubernetes kind/bug Something isn't working
Milestone

Comments

@lordofthejars
Copy link
Contributor

Describe the bug

I just created a simple project with buildpacks extension registered then I set the buildpack image, I run the following command:

./mvnw clean package -DskipTests -Dquarkus.container-image.push=true

But no push was done.

Expected behavior

Image created and pushed

Actual behavior

The container is created but not pushed:

./mvnw clean package -DskipTests -Dquarkus.container-image.push=true
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------------< org.acme:dn2 >----------------------------
[INFO] Building dn2 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ dn2 ---
[INFO] Deleting /Users/asotobu/tmp20/dn2/target
....
[INFO] --- quarkus-maven-plugin:2.7.1.Final:build (default) @ dn2 ---
[INFO] Checking for existing resources in: /Users/asotobu/tmp20/dn2/src/main/kubernetes.
[INFO] [io.quarkus.container.image.buildpack.deployment.BuildpackProcessor] Starting (local) container image build for jar using builpack.
[INFO] [io.quarkus.container.image.buildpack.deployment.BuildpackProcessor] Initiating Buildpack build
[INFO] Buildpack build invoked, preparing environment...
[INFO] Build configured with..
[INFO] - build image : codejive/buildpacks-quarkus-builder:jvm
[INFO] - run image : codejive/buildpacks-quarkus-run:jvm
[INFO] - build volumes created
[INFO] - mounted buildpack-build-lpqwgpumra at /bld
[INFO] - mounted buildpack-launch-czdfepfust at /launch
[INFO] - mounted buildpack-app-fgnbyjasaw at /app
[INFO] - mounted buildpack-platform-khdfryirwa at /platform
[INFO] - mounted /var/run/docker.sock at /var/run/docker.sock
[INFO] - mounted buildpack-output-vgcrkpmeha at /out
[INFO] - build container id 3e822b2b22846b5388c608e958d1d9a4efc0c353c929ef4da51f3ff4a3e2746d
[INFO] - uploaded archive to container at /app/content
[INFO] - uploaded env to container at /platform/env
[INFO] - launching build container
[INFO] - attaching log relay
===> DETECTING
io.quarkus.buildpacks.buildpack 0.0.1
===> ANALYZING
Previous image with name "quay.io/lordofthejars/dn2:1.0.0-SNAPSHOT" not found
Skipping buildpack layer analysis
===> BUILDING
---> Quarkus Buildpack
Building /app/content :: Native? 0
Maven transfer progress disabled.
Building using mvn package -B --no-transfer-progress -DskipTests
[INFO] Scanning for projects...
...
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ dn2 ---
[INFO] Building jar: /app/content/target/dn2-1.0.0-SNAPSHOT.jar
[INFO]
[INFO] --- quarkus-maven-plugin:2.7.1.Final:build (default) @ dn2 ---
[WARNING] Error reading service account token from: [/var/run/secrets/kubernetes.io/serviceaccount/token]. Ignoring.
[INFO] Checking for existing resources in: /app/content/src/main/kubernetes.
[WARNING] Error reading service account token from: [/var/run/secrets/kubernetes.io/serviceaccount/token]. Ignoring.
[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 2774ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  46.332 s
[INFO] Finished at: 2022-02-21T17:49:48Z
[INFO] ------------------------------------------------------------------------
Copying app to app layer
Building env config layer
Copying libs to libdeps layer
===> EXPORTING
Adding layer 'io.quarkus.buildpacks.buildpack:0-ubiconfig'
Adding layer 'io.quarkus.buildpacks.buildpack:1-app'
Adding layer 'io.quarkus.buildpacks.buildpack:2-libdeps'
Adding 1/1 app layer(s)
Adding layer 'launcher'
Adding layer 'config'
Adding layer 'process-types'
Adding label 'io.buildpacks.lifecycle.metadata'
Adding label 'io.buildpacks.build.metadata'
Adding label 'io.buildpacks.project.metadata'
Setting default process type 'web'
Saving quay.io/lordofthejars/dn2:1.0.0-SNAPSHOT...
*** Images (679a48b13e94):
      quay.io/lordofthejars/dn2:1.0.0-SNAPSHOT
Adding cache layer 'io.quarkus.buildpacks.buildpack:m2repo'
[INFO] Buildpack build complete, with exit code 0
[INFO] [io.quarkus.container.image.buildpack.deployment.BuildpackProcessor] Buildpack build complete
[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 74438ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:19 min
[INFO] Finished at: 2022-02-21T18:49:53+01:00
[INFO] ------------------------------------------------------------------------

How to Reproduce?

Create a project with buildpacks extension and run ./mvnw clean package -DskipTests -Dquarkus.container-image.push=true

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.7.1

Build tool (ie. output of mvnw --version or gradlew --version)

mvnw

Additional information

No response

@lordofthejars lordofthejars added the kind/bug Something isn't working label Feb 21, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Feb 21, 2022

/cc @geoand, @iocanel

@iocanel iocanel self-assigned this Feb 21, 2022
@iocanel
Copy link
Contributor

iocanel commented Feb 22, 2022

@lordofthejars: Using the exact same commands the image was pushed successfully (using quarkus 2.7.1.Final).

One issue I see is that no log message appears, so the user can't tell what is going on until the registry is checked.
I'll work on adding log messages.

@lordofthejars
Copy link
Contributor Author

Well I checked quay.io and I didn't see it, maybe there was some refresh issue and since no log was present I just thought that no push happened. I'll try again.

@lordofthejars
Copy link
Contributor Author

@iocanel Not working :( https://github.com/lordofthejars/quarkus.buildpack

@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Feb 23, 2022
@lordofthejars
Copy link
Contributor Author

Hi @geoand may I ask why closing it, I have not been able to make it work. I've shared the project too

@geoand
Copy link
Contributor

geoand commented Feb 23, 2022

I didn't close it. It was closed automatically because of #23880.
If it's still an issue, you and @iocanel can figure it out.

@geoand geoand reopened this Feb 23, 2022
@lordofthejars
Copy link
Contributor Author

ah ok :D

galderz pushed a commit to galderz/quarkus that referenced this issue Mar 3, 2022
@geoand
Copy link
Contributor

geoand commented Mar 29, 2022

@iocanel can you take another look at this one?

@geoand geoand removed this from the 2.8.0.CR1 milestone Mar 29, 2022
@iocanel
Copy link
Contributor

iocanel commented Mar 29, 2022

@iocanel can you take another look at this one?

Yeah, looking at it right now!

@geoand
Copy link
Contributor

geoand commented Mar 29, 2022

Thanks 🙏

@iocanel
Copy link
Contributor

iocanel commented Mar 29, 2022

The provided reproducer works for me, howver I still can't see the added log message.

@karstengresch
Copy link

I wonder if the push problem has been solved.

Neither can I push to Docker Hub nor quay.io though
a) being logged in to the registries
b) have specificed as per https://quarkus.io/guides/container-image#container-image-options username and password (even via env var)
c) have tried to specifiy (separately) the desired repo URL both via single image string as well as via separate group/name/tag.

I can push the image manually via docker and podman or create it w/o problems with Jib and S2I.

@lordofthejars - were you finally able to push the image to quay.io?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes kind/bug Something isn't working
Projects
None yet
4 participants