jib: MANIFEST_INVALID when pushing manifest to quay.io
Environment: Jenkins
- Jib version: 2.2.0
- Build tool: maven 3.6.3
- OS:: centos7 on slaves and head/master
Description of the issue:
The mvn jib:build goal constantly failed with below message. Sometimes a retry will fix it
Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.2.0:build (default-cli) on project workflow-java-sdk-process-cloud: Tried to push image manifest for quay.io/your_image but failed because: Registry may not support pushing OCI Manifest or Docker Image Manifest Version 2, Schema 2 | If this is a bug, please file an issue at https://github.com/GoogleContainerTools/jib/issues/new: 400 BAD REQUEST
[ERROR] {"errors":[{"code":"MANIFEST_INVALID","detail":{"message":"Attempt to create an invalid manifest. Please report this issue."},"message":"manifest invalid"}]}
If retry the same goal in Jenkins, it went back to normal
[INFO] --- jib-maven-plugin:2.2.0:build (default-cli) @ my project ---
[INFO]
[INFO] Containerizing application to quay.io/my_image:version, quay.io/my_image...
[INFO] Using credentials from Maven settings file for quay.io/my_image:version
[INFO] Getting manifest for base image adoptopenjdk/openjdk11@sha256:f92b946306c1f17be5578a84f61482766c4a47d6c75a2b49a49b7ef321cc750f...
[INFO] Building resources layer...
[INFO] Building dependencies layer...
[INFO] Building classes layer...
[INFO] The base image requires auth. Trying again for adoptopenjdk/openjdk11@sha256:f92b946306c1f17be5578a84f61482766c4a47d6c75a2b49a49b7ef321cc750f...
[INFO] The base image reference is manifest list, searching for linux/amd64
[INFO] Using base image with digest: sha256:63a55a2b49a12a15409c8228e7a23be3347b565d45dc7d05a03f965b495e0a90
[INFO]
[INFO] Container entrypoint set to [java, -XX:MaxRAMPercentage=75.0, -XX:+UseContainerSupport, -Djava.awt.headless=true, -Djava.security.egd=file:/dev/./urandom, -cp, /app/resources:/app/classes:/app/libs/*, mypackage.MyApplication]
[INFO]
[INFO] Built and pushed image as quay.io/my_image:version quay.io/my_image
Expected behavior: The error message is misleading and it shouldn’t fail for the first time
Steps to reproduce:
- Create a simple spring boot project with maven 3.6.3 and jib plugin 2.2.0
- Create a Jenkins job and publish the docker image to quay.io
jib-maven-plugin Configuration:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${maven-jib-plugin.version}</version>
<configuration>
<from>
<image>${jib.from.image}</image>
</from>
<to>
<image>${docker.registry}/${docker.image.name}:${version.number}</image>
<tags>
<tag>latest</tag>
</tags>
</to>
<container>
<labels>
<quay.expires-after>12w</quay.expires-after>
</labels>
<jvmFlags>
<jvmFlag>-XX:MaxRAMPercentage=75.0</jvmFlag>
<jvmFlag>-XX:+UseContainerSupport</jvmFlag>
<jvmFlag>-Djava.awt.headless=true</jvmFlag>
<jvmFlag>-Djava.security.egd=file:/dev/./urandom</jvmFlag>
</jvmFlags>
<ports>
<port>8080</port>
</ports>
</container>
</configuration>
</plugin>
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 23 (13 by maintainers)
Sure will do. Thanks for your help @chanseokoh