0

I'm trying to improve my build times for my Jenkins jobs and am trying to build docker containers with my dependencies preinstalled.

I have the following (partial) Jenkinsfile:

pipeline {
    agent { 
        docker {
            image 'docker-local.artifactory.com/app-chromium:latest'
            registryUrl 'https://docker-local.artifactory.com/'
            registryCredentialsId 'artifactoryapikey'
        }
    }
}

And, according to the logs, jenkins is properly downloading this image. The problem occurs when it tries to run it:

[Pipeline] withDockerContainer
swarm-sjc01-0270eda05830-0.0.0.0 seems to be running inside container 0270eda05830a074668a5864c52d153377eb67b6406e3912b99f79686cfaca1c
but /home/jenkins/workspace/app_PR-6011-N3O6YOXQAC4KEFHSOKKCS7CFV3GUTIIJAVHDJCR5T7LMXUPU3SLQ could not be found among []
but /home/jenkins/workspace/app_PR-6011-N3O6YOXQAC4KEFHSOKKCS7CFV3GUTIIJAVHDJCR5T7LMXUPU3SLQ@tmp could not be found among []
$ docker run -t -d -u 1000:1000 -w /home/jenkins/workspace/app_PR-6011-N3O6YOXQAC4KEFHSOKKCS7CFV3GUTIIJAVHDJCR5T7LMXUPU3SLQ -v /home/jenkins/workspace/app_PR-6011-N3O6YOXQAC4KEFHSOKKCS7CFV3GUTIIJAVHDJCR5T7LMXUPU3SLQ:/home/jenkins/workspace/app_PR-6011-N3O6YOXQAC4KEFHSOKKCS7CFV3GUTIIJAVHDJCR5T7LMXUPU3SLQ:rw -v /home/jenkins/workspace/app_PR-6011-N3O6YOXQAC4KEFHSOKKCS7CFV3GUTIIJAVHDJCR5T7LMXUPU3SLQ@tmp:/home/jenkins/workspace/app_PR-6011-N3O6YOXQAC4KEFHSOKKCS7CFV3GUTIIJAVHDJCR5T7LMXUPU3SLQ@tmp:rw -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** --entrypoint cat icm-docker-local.artifactory.swg-devops.com/app-chromium:latest
ERROR: Timeout after 10 seconds
[Pipeline] // withDockerContainer

Does anyone understand why it times out? If i provide a dockerfile instead (agent { dockerfile: true }) it builds fine. Not that this is not using the script like pipeline syntax but the newer declarative format.

mkobit
  • 43,979
  • 12
  • 156
  • 150
Paul Sachs
  • 905
  • 2
  • 11
  • 22
  • are you sure the image exist ? did you verify it from the jenkins slave that run the job – Mor Lajb Dec 04 '17 at 06:06
  • I have not tried from the jenkins slave (i don't have access to it) but the logs prior to this error show it being downloaded from the appropriate location. – Paul Sachs Dec 04 '17 at 22:45

0 Answers0