jib
jib copied to clipboard
BLOB digest different between pulled and request
Environment:
- Jib version: 3.3.1
- Build tool: Gradle 7.4.1
- OS: Linux (jenkins agent)
Description of the issue: Change my to image name and got this error from Jenkins com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: com.google.cloud.tools.jib.registry.UnexpectedBlobDigestException: The pulled BLOB has digest 'sha256:634b9d89cb14ad6ab8a6cea18a7c06535c2c021ada3a651a5ebfb84fc49b8c39', but the request digest was 'sha256:13b84a5ba0b3c315284658a027579ff93b9a9941841ce5e8bfd76980d0b2985e'
when I removed jib.from.image it works was able to create image with a new name
Expected behavior: Should be able to create an image even if image name changed
Steps to reproduce:
- In build.gradle I set the jib.from.image = quay-registry.company.com/opensource/redhat/openjdk-11:latest
- set jib.to.image = quay-registry.company.com/org/myapp:latest
- execute ./gradlew jib -Djib.configDirectory=${configDir} -Djib.useOnlyProjectCache=true -Djib.to.auth.username=${repoUserName} -Djib.to.auth.password=${repoPassword}
- Execution will work fine and will create an image
- Change jib.to.image value to quay-registry.company.com/org/group/myapp:latest
- executing same command will produce this error: com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: com.google.cloud.tools.jib.registry.UnexpectedBlobDigestException: The pulled BLOB has digest 'sha256:634b9d89cb14ad6ab8a6cea18a7c06535c2c021ada3a651a5ebfb84fc49b8c39', but the request digest was 'sha256:13b84a5ba0b3c315284658a027579ff93b9a9941841ce5e8bfd76980d0b2985e'
jib-gradle-plugin Configuration:
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.11'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'com.google.cloud.tools.jib' version '3.3.1'
}
group = 'com.company.group.cloud'
version = '1.0.0'
jar.archiveFileName = project.name + ".jar"
sourceCompatibility = '11'
jib.from.image = 'quay-registry.company.com/opensource/redhat/openjdk-11:latest'
jib.to.image = 'quay-registry.company.com/org/group/appcloudservice:latest'
....
Log output:
Additional Information: