1
resposta

x509: certificate has expired or is not yet valid

Ao tentar fazer o build informa que o certificado do docker não é mais válido:

Started by user Jenkins Alura Running as SYSTEM Building in workspace /var/lib/jenkins/workspace/jenkins-todo-list-principal using credential github-ssh

git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository git config remote.origin.url git@github.com:ribeirrs/jenkins-todo-list.git # timeout=10 Fetching upstream changes from git@github.com:ribeirrs/jenkins-todo-list.git git --version # timeout=10 using GIT_SSH to set credentials git fetch --tags --progress -- git@github.com:ribeirrs/jenkins-todo-list.git +refs/heads/:refs/remotes/origin/ # timeout=10 git rev-parse refs/remotes/origin/master^{commit} # timeout=10 git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 Checking out Revision 41020d0cb425bea26cddd0ed0dadf3dd691a97b7 (refs/remotes/origin/master) git config core.sparsecheckout # timeout=10 git checkout -f 41020d0cb425bea26cddd0ed0dadf3dd691a97b7 # timeout=10 Commit message: "seccond commit" git rev-list --no-walk 41020d0cb425bea26cddd0ed0dadf3dd691a97b7 # timeout=10 [jenkins-todo-list-principal] $ /bin/sh -xe /tmp/jenkins2266905093861601869.sh

  • docker run --rm -i hadolint/hadolint Docker Build Docker Build: building image at path /var/lib/jenkins/workspace/jenkins-todo-list-principal Step 1/7 : FROM python:3.6

ERROR: Build step failed with exception com.github.dockerjava.api.exception.DockerClientException: Could not build image: error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/c4/c4f7d42f7b89437feef3cf91fd5248f97a7a5e991a25a0b7132e6b07f6cb4412/data?verify=1586571910-V3jy%2B7KQxPOA59yzM1jlFNitSsk%3D: x509: certificate has expired or is not yet valid at com.github.dockerjava.core.command.BuildImageResultCallback.getImageId(BuildImageResultCallback.java:79) at com.github.dockerjava.core.command.BuildImageResultCallback.awaitImageId(BuildImageResultCallback.java:51) at com.nirima.jenkins.plugins.docker.builder.DockerBuilderPublisher$Run.buildImage(DockerBuilderPublisher.java:387) at com.nirima.jenkins.plugins.docker.builder.DockerBuilderPublisher$Run.run(DockerBuilderPublisher.java:313) at com.nirima.jenkins.plugins.docker.builder.DockerBuilderPublisher.perform(DockerBuilderPublisher.java:463) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1856) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) Build step 'Build / Publish Docker Image' marked build as failure Finished: FAILURE

1 resposta

Olá Rodrigo, tudo bem? O que pode está acontecendo é a sincronização de data e hora, que pode está errada, então você poderia verificar a data e hora da máquina virtual Ubuntu que foi criada pelo Vagrant, caso esteja errada, ajuste e tenta novamente.

E fala pra gente se resolveu o problema!