Description of the issue:
I am not able to publish images to the GCR (Google Container Registry), I am running the Jenkins command (mvn -T C4 clean install -DskipTests process-classes -Dbuild.number=$BUILD_NUMBER jib:build), when I squeeze the command through the terminal of linux where it is installed I was able to upload the image, but within jenkins I can not.
Expected behavior:
Upload image to gcr.io
Steps to reproduce:
Create job in Jenkins and configure to run the command:
mvn -T C4 clean install -DskipTests process-classes -Dbuild.number = $ BUILD_NUMBER jib: build
Environment:
Linux Debian 4.9.144-3.1 (2019-02-19) x86_64
Jenkins 2.164.2
jib-maven-plugin Configuration:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>1.1.2</version>
<configuration>
<from>
<image>openjdk:11-jdk-slim</image>
</from>
<to>
<image>${docker.image.prefix}/eureka</image>
<tags>
<tag>${build.number}</tag>
<tag>latest</tag>
</tags>
<credHelper>gcr</credHelper>
</to>
<container>
<jvmFlags>
<jvmFlag>-Dspring.profiles.active=producao</jvmFlag>
</jvmFlags>
<labels>
<service-name>eureka</service-name>
</labels>
<mainClass>br.com.agendeapp.eureka.EurekaServiceApplication</mainClass>
</container>
</configuration>
</plugin>
Log output:
[INFO] --- jib-maven-plugin:1.1.2:build (default-cli) @ eureka ---
[INFO]
[INFO] Containerizing application to [36mgcr.io/agende-app-222611/eureka[0m, [36mgcr.io/agende-app-222611/eureka:27[0m, [36mgcr.io/agende-app-222611/eureka[0m...
[INFO] Retrieving registry credentials for gcr.io...
[INFO] Getting base image openjdk:11-jdk-slim...
[INFO] Building dependencies layer...
[INFO] Building resources layer...
[INFO] Building classes layer...
[INFO] The base image requires auth. Trying again for openjdk:11-jdk-slim...
[INFO] Retrieving registry credentials for registry-1.docker.io...
[INFO]
[INFO] Container entrypoint set to [java, -Dspring.profiles.active=producao, -cp, /app/resources:/app/classes:/app/libs/*, br.com.agendeapp.eureka.EurekaServiceApplication]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.320 s (Wall Clock)
[INFO] Finished at: 2019-05-03T17:42:14+00:00
[INFO] Final Memory: 68M/162M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:1.1.2:build (default-cli) on project eureka: Build image failed, perhaps you should make sure you have permissions for gcr.io/agende-app-222611/eureka: Unauthorized for gcr.io/agende-app-222611/eureka: 403 Forbidden
[ERROR] {"errors":[{"code":"DENIED","message":"Access denied."}]}
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
Additional Information:
The terminal is installed gcloud sdk, and when trying to run maven the upload occurs
Hi @rafaeldalbosco. You mention that you are using the Jenkins _Google Container Registry Auth Plugin_. Let's assume that it will configure docker for your build account — that is, the ~/.docker/config.json file is setup to use your service-key. You should confirm this.
Please try removing the <credHelper> line from your pom. That statement instructs Jib to use the gcr helper (invoking docker-credential-gcr) to obtain an access token to access gcr.io. But I don't think docker-credential-gcr will use the information in the ~/.docker/config.json, and so the request is likely being sent without authentication and failing. Besides, Jib will automatically try using the gcr helper for gcr.io.
If that doesn't work, then please run Maven with -X to show more debugging information, and include the contents of the ~/.docker/config.json file (be sure to elide any long base64 strings).
If Jenkins' _Google Container Registry Auth Plugin_ does not actually configure the local docker, then I think you'll need to explicitly activate the service-key as part of your build.
Hi @briandealwis i removed credHelper> from pom but the error persisted, I was again explicitly activate the service key guide, which recommended me but was unsuccessful. I am sending the logs as requested. The maven log summarized, in the build part, if necessary, I have the entire log.
~/.docker/config.json:
{
"auths": {
"gcr.io": {
"auth": "xxxxx"
}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/18.09.5 (linux)"
},
"credHelpers": {
"asia.gcr.io": "gcr",
"eu.gcr.io": "gcr",
"gcr.io": "gcr",
"marketplace.gcr.io": "gcloud",
"staging-k8s.gcr.io": "gcr",
"us.gcr.io": "gcr"
}
}
maven log:
[eureka] $ mvn -pl support/eureka -T C4 clean install -DskipTests process-classes -Dbuild.number=30 jib:build -X
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 11.0.3, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.9.0-8-amd64", arch: "amd64", family: "unix"
...
[INFO] --- jib-maven-plugin:1.1.2:build (default-cli) @ eureka ---
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=3, ConflictMarker.nodeCount=109, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=51, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=9, ConflictResolver.conflictItemCount=106, DefaultDependencyCollector.collectTime=234, DefaultDependencyCollector.transformTime=12}
[DEBUG] com.google.cloud.tools:jib-maven-plugin:jar:1.1.2:
[DEBUG] com.google.http-client:google-http-client:jar:1.27.0:compile
[DEBUG] com.google.code.findbugs:jsr305:jar:3.0.2:compile
[DEBUG] org.apache.httpcomponents:httpclient:jar:4.5.5:compile
[DEBUG] org.apache.httpcomponents:httpcore:jar:4.4.9:compile
[DEBUG] commons-logging:commons-logging:jar:1.2:compile
[DEBUG] commons-codec:commons-codec:jar:1.10:compile
[DEBUG] com.google.j2objc:j2objc-annotations:jar:1.1:compile
[DEBUG] org.apache.commons:commons-compress:jar:1.18:compile
[DEBUG] com.google.guava:guava:jar:27.0.1-jre:compile
[DEBUG] com.google.guava:failureaccess:jar:1.0.1:compile
[DEBUG] com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[DEBUG] org.checkerframework:checker-qual:jar:2.5.2:compile
[DEBUG] com.google.errorprone:error_prone_annotations:jar:2.2.0:compile
[DEBUG] org.codehaus.mojo:animal-sniffer-annotations:jar:1.17:compile
[DEBUG] com.fasterxml.jackson.core:jackson-databind:jar:2.9.8:compile
[DEBUG] com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[DEBUG] com.fasterxml.jackson.core:jackson-core:jar:2.9.8:compile
[DEBUG] org.ow2.asm:asm:jar:7.0:compile
[DEBUG] org.apache.maven:maven-plugin-api:jar:3.5.2:compile
[DEBUG] org.apache.maven:maven-model:jar:3.5.2:compile
[DEBUG] org.apache.maven:maven-artifact:jar:3.5.2:compile
[DEBUG] org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.3:compile
[DEBUG] javax.enterprise:cdi-api:jar:1.0:compile
[DEBUG] javax.annotation:jsr250-api:jar:1.0:compile
[DEBUG] org.codehaus.plexus:plexus-utils:jar:3.1.0:compile
[DEBUG] org.codehaus.plexus:plexus-classworlds:jar:2.5.2:compile
[DEBUG] org.apache.maven:maven-core:jar:3.5.2:compile
[DEBUG] org.apache.maven:maven-settings:jar:3.5.2:compile
[DEBUG] org.apache.maven:maven-settings-builder:jar:3.5.2:compile
[DEBUG] org.codehaus.plexus:plexus-interpolation:jar:1.24:compile
[DEBUG] org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile
[DEBUG] org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[DEBUG] org.apache.maven:maven-builder-support:jar:3.5.2:compile
[DEBUG] org.apache.maven:maven-repository-metadata:jar:3.5.2:compile
[DEBUG] org.apache.maven:maven-model-builder:jar:3.5.2:compile
[DEBUG] org.apache.maven:maven-resolver-provider:jar:3.5.2:compile
[DEBUG] org.apache.maven.resolver:maven-resolver-impl:jar:1.1.0:compile
[DEBUG] org.apache.maven.resolver:maven-resolver-api:jar:1.1.0:compile
[DEBUG] org.apache.maven.resolver:maven-resolver-spi:jar:1.1.0:compile
[DEBUG] org.apache.maven.resolver:maven-resolver-util:jar:1.1.0:compile
[DEBUG] org.apache.maven.shared:maven-shared-utils:jar:3.1.0:compile
[DEBUG] commons-io:commons-io:jar:2.5:compile
[DEBUG] org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.3:compile
[DEBUG] com.google.inject:guice:jar:no_aop:4.0:compile
[DEBUG] aopalliance:aopalliance:jar:1.0:compile
[DEBUG] javax.inject:javax.inject:jar:1:compile
[DEBUG] org.codehaus.plexus:plexus-component-annotations:jar:1.7.1:compile
[DEBUG] org.apache.commons:commons-lang3:jar:3.5:compile
[DEBUG] org.apache.maven.shared:maven-verifier:jar:1.6:compile
[DEBUG] junit:junit:jar:3.8.2:compile
[DEBUG] Created new class realm plugin>com.google.cloud.tools:jib-maven-plugin:1.1.2
[DEBUG] Importing foreign packages into class realm plugin>com.google.cloud.tools:jib-maven-plugin:1.1.2
[DEBUG] Imported: < maven.api
[DEBUG] Populating class realm plugin>com.google.cloud.tools:jib-maven-plugin:1.1.2
[DEBUG] Included: com.google.cloud.tools:jib-maven-plugin:jar:1.1.2
[DEBUG] Included: com.google.http-client:google-http-client:jar:1.27.0
[DEBUG] Included: com.google.code.findbugs:jsr305:jar:3.0.2
[DEBUG] Included: org.apache.httpcomponents:httpclient:jar:4.5.5
[DEBUG] Included: org.apache.httpcomponents:httpcore:jar:4.4.9
[DEBUG] Included: commons-logging:commons-logging:jar:1.2
[DEBUG] Included: commons-codec:commons-codec:jar:1.10
[DEBUG] Included: com.google.j2objc:j2objc-annotations:jar:1.1
[DEBUG] Included: org.apache.commons:commons-compress:jar:1.18
[DEBUG] Included: com.google.guava:guava:jar:27.0.1-jre
[DEBUG] Included: com.google.guava:failureaccess:jar:1.0.1
[DEBUG] Included: com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava
[DEBUG] Included: org.checkerframework:checker-qual:jar:2.5.2
[DEBUG] Included: com.google.errorprone:error_prone_annotations:jar:2.2.0
[DEBUG] Included: org.codehaus.mojo:animal-sniffer-annotations:jar:1.17
[DEBUG] Included: com.fasterxml.jackson.core:jackson-databind:jar:2.9.8
[DEBUG] Included: com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0
[DEBUG] Included: com.fasterxml.jackson.core:jackson-core:jar:2.9.8
[DEBUG] Included: org.ow2.asm:asm:jar:7.0
[DEBUG] Included: javax.enterprise:cdi-api:jar:1.0
[DEBUG] Included: javax.annotation:jsr250-api:jar:1.0
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:3.1.0
[DEBUG] Included: org.codehaus.plexus:plexus-interpolation:jar:1.24
[DEBUG] Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4
[DEBUG] Included: org.sonatype.plexus:plexus-cipher:jar:1.4
[DEBUG] Included: org.apache.maven:maven-builder-support:jar:3.5.2
[DEBUG] Included: org.apache.maven:maven-resolver-provider:jar:3.5.2
[DEBUG] Included: org.apache.maven.resolver:maven-resolver-impl:jar:1.1.0
[DEBUG] Included: org.apache.maven.resolver:maven-resolver-api:jar:1.1.0
[DEBUG] Included: org.apache.maven.resolver:maven-resolver-spi:jar:1.1.0
[DEBUG] Included: org.apache.maven.resolver:maven-resolver-util:jar:1.1.0
[DEBUG] Included: org.apache.maven.shared:maven-shared-utils:jar:3.1.0
[DEBUG] Included: commons-io:commons-io:jar:2.5
[DEBUG] Included: org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.3
[DEBUG] Included: com.google.inject:guice:jar:no_aop:4.0
[DEBUG] Included: aopalliance:aopalliance:jar:1.0
[DEBUG] Included: org.codehaus.plexus:plexus-component-annotations:jar:1.7.1
[DEBUG] Included: org.apache.commons:commons-lang3:jar:3.5
[DEBUG] Included: org.apache.maven.shared:maven-verifier:jar:1.6
[DEBUG] Included: junit:junit:jar:3.8.2
[DEBUG] Configuring mojo com.google.cloud.tools:jib-maven-plugin:1.1.2:build from plugin realm ClassRealm[plugin>com.google.cloud.tools:jib-maven-plugin:1.1.2, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@8bcc55f]
[DEBUG] Configuring mojo 'com.google.cloud.tools:jib-maven-plugin:1.1.2:build' with basic configurator -->
[DEBUG] (f) allowInsecureRegistries = false
[DEBUG] (f) jvmFlags = [-Dspring.profiles.active=producao]
[DEBUG] (f) labels = {service-name=eureka}
[DEBUG] (f) mainClass = br.com.agendeapp.eureka.EurekaServiceApplication
[DEBUG] (f) container = com.google.cloud.tools.jib.maven.JibPluginConfiguration$ContainerParameters@96a5531
[DEBUG] (f) image = openjdk:11-jdk-slim
[DEBUG] (f) from = com.google.cloud.tools.jib.maven.JibPluginConfiguration$FromConfiguration@760e5a87
[DEBUG] (f) project = MavenProject: br.com.agendeapp.cloud:eureka:1.0.0-SNAPSHOT @ /var/lib/jenkins/workspace/eureka/support/eureka/pom.xml
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@3b799e5f
[DEBUG] (f) skip = false
[DEBUG] (f) image = gcr.io/agende-app-222611/eureka
[DEBUG] (f) tags = [30, latest]
[DEBUG] (f) to = com.google.cloud.tools.jib.maven.JibPluginConfiguration$ToConfiguration@5c81d0d2
[DEBUG] -- end configuration --
[INFO]
[INFO] Containerizing application to [36mgcr.io/agende-app-222611/eureka[0m, [36mgcr.io/agende-app-222611/eureka:30[0m, [36mgcr.io/agende-app-222611/eureka[0m...
[DEBUG] Containerizing application with the following files:
[DEBUG] Dependencies:
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/boot/spring-boot-starter-actuator/2.1.1.RELEASE/spring-boot-starter-actuator-2.1.1.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/boot/spring-boot-starter/2.1.1.RELEASE/spring-boot-starter-2.1.1.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/boot/spring-boot/2.1.1.RELEASE/spring-boot-2.1.1.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.1.1.RELEASE/spring-boot-autoconfigure-2.1.1.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.1.1.RELEASE/spring-boot-starter-logging-2.1.1.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/ch/qos/logback/logback-classic/1.1.6/logback-classic-1.1.6.jar
[DEBUG] /var/lib/jenkins/.m2/repository/ch/qos/logback/logback-core/1.1.6/logback-core-1.1.6.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.11.1/log4j-to-slf4j-2.11.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/apache/logging/log4j/log4j-api/2.11.1/log4j-api-2.11.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar
[DEBUG] /var/lib/jenkins/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/spring-core/5.1.3.RELEASE/spring-core-5.1.3.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/spring-jcl/5.1.3.RELEASE/spring-jcl-5.1.3.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/yaml/snakeyaml/1.23/snakeyaml-1.23.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/boot/spring-boot-actuator-autoconfigure/2.1.1.RELEASE/spring-boot-actuator-autoconfigure-2.1.1.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/boot/spring-boot-actuator/2.1.1.RELEASE/spring-boot-actuator-2.1.1.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/spring-context/5.1.3.RELEASE/spring-context-5.1.3.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/spring-aop/5.1.3.RELEASE/spring-aop-5.1.3.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/spring-beans/5.1.3.RELEASE/spring-beans-5.1.3.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/spring-expression/5.1.3.RELEASE/spring-expression-5.1.3.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.7/jackson-datatype-jsr310-2.9.7.jar
[DEBUG] /var/lib/jenkins/.m2/repository/io/micrometer/micrometer-core/1.1.1/micrometer-core-1.1.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.9/HdrHistogram-2.1.9.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/cloud/spring-cloud-starter-netflix-eureka-server/2.1.0.RELEASE/spring-cloud-starter-netflix-eureka-server-2.1.0.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/cloud/spring-cloud-starter/2.1.0.RELEASE/spring-cloud-starter-2.1.0.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/cloud/spring-cloud-context/2.1.0.RELEASE/spring-cloud-context-2.1.0.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/security/spring-security-crypto/5.1.2.RELEASE/spring-security-crypto-5.1.2.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/cloud/spring-cloud-commons/2.1.0.RELEASE/spring-cloud-commons-2.1.0.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/security/spring-security-rsa/1.0.7.RELEASE/spring-security-rsa-1.0.7.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.60/bcpkix-jdk15on-1.60.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.60/bcprov-jdk15on-1.60.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/cloud/spring-cloud-netflix-eureka-server/2.1.0.RELEASE/spring-cloud-netflix-eureka-server-2.1.0.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.1.1.RELEASE/spring-boot-starter-web-2.1.1.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.1.1.RELEASE/spring-boot-starter-json-2.1.1.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.9.7/jackson-datatype-jdk8-2.9.7.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.7/jackson-module-parameter-names-2.9.7.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.1.1.RELEASE/spring-boot-starter-tomcat-2.1.1.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.13/tomcat-embed-core-9.0.13.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/9.0.13/tomcat-embed-el-9.0.13.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.13/tomcat-embed-websocket-9.0.13.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.13.Final/hibernate-validator-6.0.13.Final.jar
[DEBUG] /var/lib/jenkins/.m2/repository/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/jboss/logging/jboss-logging/3.3.2.Final/jboss-logging-3.3.2.Final.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/fasterxml/classmate/1.4.0/classmate-1.4.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/spring-webmvc/5.1.3.RELEASE/spring-webmvc-5.1.3.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/boot/spring-boot-starter-freemarker/2.1.1.RELEASE/spring-boot-starter-freemarker-2.1.1.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/freemarker/freemarker/2.3.28/freemarker-2.3.28.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/spring-context-support/5.1.3.RELEASE/spring-context-support-5.1.3.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/cloud/spring-cloud-netflix-hystrix/2.1.0.RELEASE/spring-cloud-netflix-hystrix-2.1.0.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/boot/spring-boot-starter-aop/2.1.1.RELEASE/spring-boot-starter-aop-2.1.1.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/aspectj/aspectjweaver/1.9.2/aspectjweaver-1.9.2.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/cloud/spring-cloud-netflix-eureka-client/2.1.0.RELEASE/spring-cloud-netflix-eureka-client-2.1.0.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/eureka/eureka-client/1.9.8/eureka-client-1.9.8.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/codehaus/jettison/jettison/1.3.7/jettison-1.3.7.jar
[DEBUG] /var/lib/jenkins/.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/netflix-commons/netflix-eventbus/0.3.0/netflix-eventbus-0.3.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/netflix-commons/netflix-infix/0.3.0/netflix-infix-0.3.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/commons-jxpath/commons-jxpath/1.3/commons-jxpath-1.3.jar
[DEBUG] /var/lib/jenkins/.m2/repository/joda-time/joda-time/2.10.1/joda-time-2.10.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/antlr/antlr-runtime/3.4/antlr-runtime-3.4.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/apache/commons/commons-math/2.2/commons-math-2.2.jar
[DEBUG] /var/lib/jenkins/.m2/repository/javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/servo/servo-core/0.12.21/servo-core-0.12.21.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/sun/jersey/jersey-core/1.19.1/jersey-core-1.19.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/sun/jersey/jersey-client/1.19.1/jersey-client-1.19.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/sun/jersey/contribs/jersey-apache-client4/1.19.1/jersey-apache-client4-1.19.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/apache/httpcomponents/httpcore/4.4.10/httpcore-4.4.10.jar
[DEBUG] /var/lib/jenkins/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/google/inject/guice/4.1.0/guice-4.1.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/github/vlsi/compactmap/compactmap/1.2.1/compactmap-1.2.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/github/andrewoma/dexx/dexx-collections/0.2/dexx-collections-0.2.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/sun/jersey/jersey-servlet/1.19.1/jersey-servlet-1.19.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/sun/jersey/jersey-server/1.19.1/jersey-server-1.19.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/eureka/eureka-core/1.9.8/eureka-core-1.9.8.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/codehaus/woodstox/woodstox-core-asl/4.4.1/woodstox-core-asl-4.4.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/archaius/archaius-core/0.7.6/archaius-core-0.7.6.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/google/code/findbugs/jsr305/3.0.1/jsr305-3.0.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/google/guava/guava/16.0/guava-16.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.9.7/jackson-dataformat-xml-2.9.7.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.9.7/jackson-module-jaxb-annotations-2.9.7.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/codehaus/woodstox/stax2-api/3.1.4/stax2-api-3.1.4.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/fasterxml/woodstox/woodstox-core/5.0.3/woodstox-core-5.0.3.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/thoughtworks/xstream/xstream/1.4.10/xstream-1.4.10.jar
[DEBUG] /var/lib/jenkins/.m2/repository/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/cloud/spring-cloud-starter-netflix-archaius/2.1.0.RELEASE/spring-cloud-starter-netflix-archaius-2.1.0.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/cloud/spring-cloud-netflix-ribbon/2.1.0.RELEASE/spring-cloud-netflix-ribbon-2.1.0.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/cloud/spring-cloud-netflix-archaius/2.1.0.RELEASE/spring-cloud-netflix-archaius-2.1.0.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/commons-configuration/commons-configuration/1.8/commons-configuration-1.8.jar
[DEBUG] /var/lib/jenkins/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/cloud/spring-cloud-starter-netflix-ribbon/2.1.0.RELEASE/spring-cloud-starter-netflix-ribbon-2.1.0.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/ribbon/ribbon/2.3.0/ribbon-2.3.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/ribbon/ribbon-transport/2.3.0/ribbon-transport-2.3.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/io/reactivex/rxnetty-contexts/0.4.9/rxnetty-contexts-0.4.9.jar
[DEBUG] /var/lib/jenkins/.m2/repository/io/reactivex/rxnetty-servo/0.4.9/rxnetty-servo-0.4.9.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/hystrix/hystrix-core/1.5.18/hystrix-core-1.5.18.jar
[DEBUG] /var/lib/jenkins/.m2/repository/io/reactivex/rxnetty/0.4.9/rxnetty-0.4.9.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/ribbon/ribbon-core/2.3.0/ribbon-core-2.3.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/ribbon/ribbon-httpclient/2.3.0/ribbon-httpclient-2.3.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/netflix-commons/netflix-commons-util/0.3.0/netflix-commons-util-0.3.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/ribbon/ribbon-loadbalancer/2.3.0/ribbon-loadbalancer-2.3.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/netflix-commons/netflix-statistics/0.1.1/netflix-statistics-0.1.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/io/reactivex/rxjava/1.3.8/rxjava-1.3.8.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/netflix/ribbon/ribbon-eureka/2.3.0/ribbon-eureka-2.3.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/cloud/spring-cloud-starter-config/2.1.0.RELEASE/spring-cloud-starter-config-2.1.0.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/cloud/spring-cloud-config-client/2.1.0.RELEASE/spring-cloud-config-client-2.1.0.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/springframework/spring-web/5.1.3.RELEASE/spring-web-5.1.3.RELEASE.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.7/jackson-databind-2.9.7.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.7/jackson-core-2.9.7.jar
[DEBUG] /var/lib/jenkins/.m2/repository/org/jolokia/jolokia-core/1.6.0/jolokia-core-1.6.0.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar
[DEBUG] /var/lib/jenkins/.m2/repository/net/logstash/logback/logstash-logback-encoder/4.7/logstash-logback-encoder-4.7.jar
[DEBUG] /var/lib/jenkins/.m2/repository/javax/xml/bind/jaxb-api/2.2.11/jaxb-api-2.2.11.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/sun/xml/bind/jaxb-core/2.2.11/jaxb-core-2.2.11.jar
[DEBUG] /var/lib/jenkins/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.11/jaxb-impl-2.2.11.jar
[DEBUG] /var/lib/jenkins/.m2/repository/javax/activation/activation/1.1.1/activation-1.1.1.jar
[DEBUG] Resources:
[DEBUG] /var/lib/jenkins/workspace/eureka/support/eureka/target/classes/bootstrap.yml
[DEBUG] /var/lib/jenkins/workspace/eureka/support/eureka/target/classes/br
[DEBUG] /var/lib/jenkins/workspace/eureka/support/eureka/target/classes/br/com
[DEBUG] /var/lib/jenkins/workspace/eureka/support/eureka/target/classes/br/com/agendeapp
[DEBUG] /var/lib/jenkins/workspace/eureka/support/eureka/target/classes/br/com/agendeapp/eureka
[DEBUG] /var/lib/jenkins/workspace/eureka/support/eureka/target/classes/logback-spring.old-xml
[DEBUG] Classes:
[DEBUG] /var/lib/jenkins/workspace/eureka/support/eureka/target/classes/br
[DEBUG] /var/lib/jenkins/workspace/eureka/support/eureka/target/classes/br/com
[DEBUG] /var/lib/jenkins/workspace/eureka/support/eureka/target/classes/br/com/agendeapp
[DEBUG] /var/lib/jenkins/workspace/eureka/support/eureka/target/classes/br/com/agendeapp/eureka
[DEBUG] /var/lib/jenkins/workspace/eureka/support/eureka/target/classes/br/com/agendeapp/eureka/EurekaServiceApplication.class
[DEBUG] TIMING Building and pushing image
[INFO] Retrieving registry credentials for gcr.io...
[DEBUG] TIMING Retrieving registry credentials for gcr.io
[DEBUG] TIMING Building application layers
[INFO] Building dependencies layer...
[DEBUG] TIMING Building dependencies layer
[INFO] Building resources layer...
[DEBUG] TIMING Building resources layer
[DEBUG] TIMED Building application layers : 14.207 ms
[INFO] Getting base image openjdk:11-jdk-slim...
[DEBUG] TIMING Pulling base image manifest
[INFO] Building classes layer...
[DEBUG] TIMING Building classes layer
[DEBUG] TIMING Setting up to push layers
[DEBUG] TIMED Setting up to push layers : 13.186 ms
[DEBUG] Building resources layer built sha256:df4c72bd22cff1cb6621e15f4b88abad0a4ace204e332beaecb57fa4c3506283
[DEBUG] Building classes layer built sha256:7f88cd466f8bd716ce0321fc09edcfa074a30f6bfaf3b60c17a17c732ddd7f80
[DEBUG] TIMED Building classes layer : 1099.88 ms
[DEBUG] TIMED Building resources layer : 1131.267 ms
[DEBUG] Using docker-credential-gcr for gcr.io
[DEBUG] TIMED Retrieving registry credentials for gcr.io : 1948.012 ms
[DEBUG] TIMING Authenticating with push to gcr.io
[INFO] The base image requires auth. Trying again for openjdk:11-jdk-slim...
[INFO] Retrieving registry credentials for registry-1.docker.io...
[DEBUG] TIMING Retrieving registry credentials for registry-1.docker.io
[DEBUG] No credentials could be retrieved for registry registry-1.docker.io
[DEBUG] TIMED Retrieving registry credentials for registry-1.docker.io : 126.949 ms
[DEBUG] TIMED Authenticating with push to gcr.io : 514.27 ms
[DEBUG] TIMING Pushing BLOB digest: sha256:df4c72bd22cff1cb6621e15f4b88abad0a4ace204e332beaecb57fa4c3506283, size: 761
[DEBUG] TIMING Pushing BLOB digest: sha256:7f88cd466f8bd716ce0321fc09edcfa074a30f6bfaf3b60c17a17c732ddd7f80, size: 638
[DEBUG] BLOB : digest: sha256:7f88cd466f8bd716ce0321fc09edcfa074a30f6bfaf3b60c17a17c732ddd7f80, size: 638 already exists on registry
[DEBUG] TIMED Pushing BLOB digest: sha256:7f88cd466f8bd716ce0321fc09edcfa074a30f6bfaf3b60c17a17c732ddd7f80, size: 638 : 131.961 ms
[DEBUG] TIMING pushBlob
[DEBUG] TIMING pushBlob POST sha256:df4c72bd22cff1cb6621e15f4b88abad0a4ace204e332beaecb57fa4c3506283
[DEBUG] TIMED pushBlob PATCH sha256:df4c72bd22cff1cb6621e15f4b88abad0a4ace204e332beaecb57fa4c3506283 : 82.521 ms
[DEBUG] TIMED pushBlob POST sha256:df4c72bd22cff1cb6621e15f4b88abad0a4ace204e332beaecb57fa4c3506283 : 1263.82 ms
[DEBUG] TIMED pushBlob : 1347.718 ms
[DEBUG] TIMED Pushing BLOB digest: sha256:df4c72bd22cff1cb6621e15f4b88abad0a4ace204e332beaecb57fa4c3506283, size: 761 : 1621.562 ms
[DEBUG] TIMED Pulling base image manifest : 4007.769 ms
[DEBUG] TIMING Setting up base image caching
[DEBUG] TIMING Pulling base image layer sha256:27833a3ba0a545deda33bb01eaf95a14d05d43bf30bce9267d92d17f069fe897
[DEBUG] TIMED Pulling base image layer sha256:27833a3ba0a545deda33bb01eaf95a14d05d43bf30bce9267d92d17f069fe897 : 0.526 ms
[DEBUG] TIMING Pulling base image layer sha256:6aaf465b8930951069752df0f86b402bf6dde99a2c174468f748d056689a470b
[DEBUG] TIMED Pulling base image layer sha256:6aaf465b8930951069752df0f86b402bf6dde99a2c174468f748d056689a470b : 0.272 ms
[DEBUG] TIMING Pulling base image layer sha256:16d944e3d00df7bedd2f9a6aa678132a1fb785f7d56b16fdf24c22d5c7c3b7a1
[DEBUG] TIMING Pulling base image layer sha256:67c4e741e6889f29b5366d7f6f29f93b736194f08439b9079f013dd584efb03f
[DEBUG] TIMING Pulling base image layer sha256:0684138f4cb6b633004d5295eaba82edf4f7396b993455bba078af58cbe63acc
[DEBUG] TIMED Pulling base image layer sha256:0684138f4cb6b633004d5295eaba82edf4f7396b993455bba078af58cbe63acc : 0.247 ms
[DEBUG] TIMED Pulling base image layer sha256:16d944e3d00df7bedd2f9a6aa678132a1fb785f7d56b16fdf24c22d5c7c3b7a1 : 2.341 ms
[DEBUG] TIMED Pulling base image layer sha256:67c4e741e6889f29b5366d7f6f29f93b736194f08439b9079f013dd584efb03f : 1.595 ms
[DEBUG] TIMED Setting up base image caching : 14.318 ms
[DEBUG] TIMING Setting up to push layers
[DEBUG] TIMING Pushing BLOB digest: sha256:27833a3ba0a545deda33bb01eaf95a14d05d43bf30bce9267d92d17f069fe897, size: 22496048
[DEBUG] TIMING Pushing BLOB digest: sha256:16d944e3d00df7bedd2f9a6aa678132a1fb785f7d56b16fdf24c22d5c7c3b7a1, size: 454886
[DEBUG] TIMING Pushing BLOB digest: sha256:6aaf465b8930951069752df0f86b402bf6dde99a2c174468f748d056689a470b, size: 224
[DEBUG] TIMING Pulling base image layer sha256:933857515267528690d839852bfe5098519bf1bfcaa598a5e59cab42d61e3563
[DEBUG] TIMED Pulling base image layer sha256:933857515267528690d839852bfe5098519bf1bfcaa598a5e59cab42d61e3563 : 0.673 ms
[DEBUG] TIMING Pushing BLOB digest: sha256:0684138f4cb6b633004d5295eaba82edf4f7396b993455bba078af58cbe63acc, size: 248
[DEBUG] TIMED Setting up to push layers : 24.008 ms
[DEBUG] TIMING Pushing BLOB digest: sha256:933857515267528690d839852bfe5098519bf1bfcaa598a5e59cab42d61e3563, size: 264960991
[DEBUG] TIMING Pushing BLOB digest: sha256:67c4e741e6889f29b5366d7f6f29f93b736194f08439b9079f013dd584efb03f, size: 131
[DEBUG] BLOB : digest: sha256:6aaf465b8930951069752df0f86b402bf6dde99a2c174468f748d056689a470b, size: 224 already exists on registry
[DEBUG] TIMED Pushing BLOB digest: sha256:6aaf465b8930951069752df0f86b402bf6dde99a2c174468f748d056689a470b, size: 224 : 147.399 ms
[DEBUG] BLOB : digest: sha256:67c4e741e6889f29b5366d7f6f29f93b736194f08439b9079f013dd584efb03f, size: 131 already exists on registry
[DEBUG] TIMED Pushing BLOB digest: sha256:67c4e741e6889f29b5366d7f6f29f93b736194f08439b9079f013dd584efb03f, size: 131 : 130.429 ms
[DEBUG] BLOB : digest: sha256:16d944e3d00df7bedd2f9a6aa678132a1fb785f7d56b16fdf24c22d5c7c3b7a1, size: 454886 already exists on registry
[DEBUG] TIMED Pushing BLOB digest: sha256:16d944e3d00df7bedd2f9a6aa678132a1fb785f7d56b16fdf24c22d5c7c3b7a1, size: 454886 : 172.649 ms
[DEBUG] BLOB : digest: sha256:0684138f4cb6b633004d5295eaba82edf4f7396b993455bba078af58cbe63acc, size: 248 already exists on registry
[DEBUG] TIMED Pushing BLOB digest: sha256:0684138f4cb6b633004d5295eaba82edf4f7396b993455bba078af58cbe63acc, size: 248 : 159.462 ms
[DEBUG] BLOB : digest: sha256:27833a3ba0a545deda33bb01eaf95a14d05d43bf30bce9267d92d17f069fe897, size: 22496048 already exists on registry
[DEBUG] TIMED Pushing BLOB digest: sha256:27833a3ba0a545deda33bb01eaf95a14d05d43bf30bce9267d92d17f069fe897, size: 22496048 : 188.009 ms
[DEBUG] BLOB : digest: sha256:933857515267528690d839852bfe5098519bf1bfcaa598a5e59cab42d61e3563, size: 264960991 already exists on registry
[DEBUG] TIMED Pushing BLOB digest: sha256:933857515267528690d839852bfe5098519bf1bfcaa598a5e59cab42d61e3563, size: 264960991 : 166.07 ms
[DEBUG] Building dependencies layer built sha256:7ff0bf8b489342d132794fb6aabaef4aae7c1cbb256988cb4f48ad9100e6c78e
[DEBUG] TIMED Building dependencies layer : 5775.3 ms
[DEBUG] TIMING Pushing BLOB digest: sha256:7ff0bf8b489342d132794fb6aabaef4aae7c1cbb256988cb4f48ad9100e6c78e, size: 41117584
[DEBUG] TIMING Building container configuration
[INFO]
[INFO] Container entrypoint set to [java, -Dspring.profiles.active=producao, -cp, /app/resources:/app/classes:/app/libs/*, br.com.agendeapp.eureka.EurekaServiceApplication]
[DEBUG] TIMED Building container configuration : 0.82 ms
[DEBUG] TIMING Pushing container configuration
[DEBUG] BLOB : digest: sha256:7ff0bf8b489342d132794fb6aabaef4aae7c1cbb256988cb4f48ad9100e6c78e, size: 41117584 already exists on registry
[DEBUG] TIMED Pushing BLOB digest: sha256:7ff0bf8b489342d132794fb6aabaef4aae7c1cbb256988cb4f48ad9100e6c78e, size: 41117584 : 113.21 ms
[DEBUG] TIMING Pushing BLOB digest: sha256:3ad4efa3dd3f6cce8d0bdc70022b422c5e9c5d85109872fe9710d65de8b863a4, size: 4317
[DEBUG] TIMED Pushing container configuration : 145.487 ms
[DEBUG] TIMED Building and pushing image : 6073.994 ms
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.578 s (Wall Clock)
[INFO] Finished at: 2019-05-06T14:59:32+00:00
[INFO] Final Memory: 70M/168M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:1.1.2:build (default-cli) on project eureka: Build image failed, perhaps you should make sure you have permissions for gcr.io/agende-app-222611/eureka: Unauthorized for gcr.io/agende-app-222611/eureka: 403 Forbidden
[ERROR] {"errors":[{"code":"DENIED","message":"Access denied."}]}
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.cloud.tools:jib-maven-plugin:1.1.2:build (default-cli) on project eureka: Build image failed, perhaps you should make sure you have permissions for gcr.io/agende-app-222611/eureka
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:185)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:181)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.maven.plugin.MojoExecutionException: Build image failed, perhaps you should make sure you have permissions for gcr.io/agende-app-222611/eureka
at com.google.cloud.tools.jib.maven.BuildImageMojo.execute(BuildImageMojo.java:168)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 11 more
Caused by: com.google.cloud.tools.jib.registry.RegistryUnauthorizedException: Unauthorized for gcr.io/agende-app-222611/eureka
at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.call(RegistryEndpointCaller.java:271)
at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.callWithAllowInsecureRegistryHandling(RegistryEndpointCaller.java:171)
at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.call(RegistryEndpointCaller.java:161)
at com.google.cloud.tools.jib.registry.RegistryClient.callRegistryEndpoint(RegistryClient.java:356)
at com.google.cloud.tools.jib.registry.RegistryClient.pushBlob(RegistryClient.java:314)
at com.google.cloud.tools.jib.builder.steps.PushBlobStep.call(PushBlobStep.java:124)
at com.google.cloud.tools.jib.builder.steps.PushBlobStep.call(PushBlobStep.java:40)
at com.google.common.util.concurrent.CombinedFuture$CallableInterruptibleTask.runInterruptibly(CombinedFuture.java:180)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
... 3 more
Caused by: com.google.api.client.http.HttpResponseException: 403 Forbidden
{"errors":[{"code":"DENIED","message":"Access denied."}]}
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1102)
at com.google.cloud.tools.jib.http.Connection.send(Connection.java:200)
at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.call(RegistryEndpointCaller.java:251)
... 11 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
jib-maven-plugin Changed configuration:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>1.1.2</version>
<configuration>
<from>
<image>openjdk:11-jdk-slim</image>
</from>
<to>
<image>${docker.image.prefix}/eureka</image>
<tags>
<tag>${build.number}</tag>
<tag>latest</tag>
</tags>
</to>
<container>
<jvmFlags>
<jvmFlag>-Dspring.profiles.active=producao</jvmFlag>
</jvmFlags>
<labels>
<service-name>eureka</service-name>
</labels>
<mainClass>br.com.agendeapp.eureka.EurekaServiceApplication</mainClass>
</container>
</configuration>
</plugin>
@rafaeldalbosco I removed your auth token from the above as it contains your service account's private key. Please go to the Cloud Console and delete the agende-app-222611 service's key and create a new key!
But thank you for including it as I was able to walk through the process. It looks like the Jenkins plugin is pushing the configured service account key into your ~/.docker/config.json via the "auths" section for gcr.io. But from your build logs, Jib seems to be finding docker-credential-gcr on your PATH and using the result (I'm not sure where it's getting its account details from?) which is taking precedence over the "auths" entry in your ~/.docker/config.json.
[DEBUG] Using docker-credential-gcr for gcr.io
[DEBUG] TIMED Retrieving registry credentials for gcr.io : 1948.012 ms
[DEBUG] TIMING Authenticating with push to gcr.io
I suspect that if you remove docker-credential-gcr from your PATH that you'll find the build starts to work.
So why is Jib using docker-credential-gcr first? We're prioritizing the inferred credential provider over the docker-config file in DefaultCredentialRetrievers:
https://github.com/GoogleContainerTools/jib/blob/5bc07f6e96a00a8bfd8e0b4157c11894e38bef34/jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/DefaultCredentialRetrievers.java#L140-L141
@GoogleContainerTools/java-tools: I think we should reverse that order, so the inferred provider comes last.
+1. Although I suppose this could make some current working configurations have the reverse issue,
Reversing the order makes sense. Maybe the original intention was that if the registry is gcr.io and there exists a runnable docker-credential-gcr binary, the user should really configure docker-credential-gcr correctly as a priority. However, with the current order, the only way to circumvent the issue is to remove the cred helper (either explicitly or just from $PATH). OTOH, in the reverse case, the user can explicitly configure <credHelper> to override docker.json.
My guess is that most .docker/config.json files would have credentials helper mappings for the various gcr.io registry flavours to gcloud or gcr. docker-credential-gcr's docs say:
By default, the helper searches for GCR credentials in the following order:
- In the helper's private credential store (i.e. those stored via
docker-credential-gcr gcr-login)- From the
gcloudSDK (i.e. the one printed viagcloud config config-helper --force-auth-refresh --format='value(credential.access_token)').- In a JSON file whose path is specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable.
- In a JSON file in a location known to the helper:
- On Windows, this is
%APPDATA%/gcloud/application_default_credentials.json.
- On other systems,
$HOME/.config/gcloud/application_default_credentials.json.
- On Google App Engine, it uses the
appengine.AccessTokenfunction.- On Google Compute Engine, Kubernetes Engine, and App Engine Managed VMs, it fetches the credentials of the _service account_ associated with the VM from the metadata server (if available).
So (2) will normally do the same as the docker-credential-gcloud, I suspect.
Thanks @briandealwis for the help, I managed to upload the image, following your guidelines. I will revoke the credentials.
My solution was:
<credHelper>gcr</credHelper> do pom;docker-credential-gcr from the PATH;.docker/config.json file that I followed the tutorial explicitly activate the service-key@rafaeldalbosco v1.3.0 is released, and it will give priority to the credentials explicitly configured in .docker/config.json before attempting a well-known credential helper on PATH.
@chanseokoh Okay, I tested it and it worked.