0

我正在尝试改善我的 Jenkins 作业的构建时间,并尝试构建预先安装了我的依赖项的 docker 容器。

我有以下(部分)Jenkinsfile

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

而且,根据日志,詹金斯正在正确下载此图像。当它尝试运行它时会出现问题:

[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

有谁知道为什么会超时?如果我提供了一个 dockerfile(代理 { dockerfile: true })它构建得很好。并不是说这不是使用类似管道语法的脚本,而是使用较新的声明性格式。

4

0 回答 0