Nginx入门示例持续集成出错

  • Choerodon平台版本:0.19

  • 运行环境: 猪齿鱼标准环境

  • 问题描述:

    在做官方文档快速入门——项目成员——创建一个Nginx示例中,到第四步最后push代码触发持续集成的时候报了错误,应该是登录Docker镜像仓库的时候出了错。

  • 执行的操作:
    本地修改完Nginx应用代码,Push触发项目持续集成

  • 报错信息(请尽量使用代码块或系统截图的形式展现):
    Running with gitlab-runner 11.8.0~beta.0.g30829456 (30829456)
    on choerodon-runner 1798LyZA
    Using Kubernetes namespace: tools
    Using Kubernetes executor with image registry.cn-hangzhou.aliyuncs.com/choerodon-tools/cibase:0.7.0
    Waiting for pod tools/runner-1798lyza-project-5931-concurrent-0btbs2 to be running, status is Pending
    Waiting for pod tools/runner-1798lyza-project-5931-concurrent-0btbs2 to be running, status is Pending
    Waiting for pod tools/runner-1798lyza-project-5931-concurrent-0btbs2 to be running, status is Pending
    Waiting for pod tools/runner-1798lyza-project-5931-concurrent-0btbs2 to be running, status is Pending
    Waiting for pod tools/runner-1798lyza-project-5931-concurrent-0btbs2 to be running, status is Pending
    Waiting for pod tools/runner-1798lyza-project-5931-concurrent-0btbs2 to be running, status is Pending
    Running on runner-1798lyza-project-5931-concurrent-0btbs2 via shared-runner-6f86f7566b-bndnh…
    Cloning repository…
    Cloning into ‘/ora-zsjs/nginx-gavin’…
    Checking out cc92962e as master…
    Skipping Git submodules setup
    $ http_status_code=curl -o .auto_devops.sh -s -m 10 --connect-timeout 10 -w %{http_code} "${CHOERODON_URL}/devops/ci?token=${Token}" # collapsed multi-line command
    $ docker login -u ${DOCKER_USER} -p ${DOCKER_PWD} ${DOCKER_REGISTRY}
    Error: Cannot perform an interactive login from a non TTY device
    ERROR: Job failed: command terminated with exit code 1

你好,这是由于本次升级0.19更换了变量名所致,你所看文档还停留在0.18版本,请将

docker login -u ${DOCKER_USER} -p ${DOCKER_PWD} ${DOCKER_REGISTRY}

更换为

docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD} ${DOCKER_REGISTRY}

你好,我需改了.gitlab-ci.yaml中使用到的这两个环境变量,重新push时,持续集成一直处于Pending状态,过了大概5分钟左右执行失败了,推送时认证报错如下:
Running with gitlab-runner 11.8.0~beta.0.g30829456 (30829456)
on choerodon-runner 1798LyZA
Using Kubernetes namespace: tools
Using Kubernetes executor with image registry.cn-hangzhou.aliyuncs.com/choerodon-tools/cibase:0.7.0
Waiting for pod tools/runner-1798lyza-project-5931-concurrent-0bhq7l to be running, status is Pending
Waiting for pod tools/runner-1798lyza-project-5931-concurrent-0bhq7l to be running, status is Pending
Waiting for pod tools/runner-1798lyza-project-5931-concurrent-0bhq7l to be running, status is Pending
Waiting for pod tools/runner-1798lyza-project-5931-concurrent-0bhq7l to be running, status is Pending
Waiting for pod tools/runner-1798lyza-project-5931-concurrent-0bhq7l to be running, status is Pending
Waiting for pod tools/runner-1798lyza-project-5931-concurrent-0bhq7l to be running, status is Pending
Waiting for pod tools/runner-1798lyza-project-5931-concurrent-0bhq7l to be running, status is Pending
Running on runner-1798lyza-project-5931-concurrent-0bhq7l via shared-runner-6f86f7566b-bndnh…
Cloning repository…
Cloning into ‘/ora-zsjs/nginx-gavin’…
Checking out 724587d7 as master…
Skipping Git submodules setup
$ http_status_code=curl -o .auto_devops.sh -s -m 10 --connect-timeout 10 -w %{http_code} "${CHOERODON_URL}/devops/ci?token=${Token}" # collapsed multi-line command
$ docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD} ${DOCKER_REGISTRY}
Login Succeeded
$ docker build --pull -t ${DOCKER_REGISTRY}/${GROUP_NAME}/${PROJECT_NAME}:${CI_COMMIT_TAG} .
Sending build context to Docker daemon 67.07kB

Step 1/1 : FROM nginx:1.13.5-alpine
1.13.5-alpine: Pulling from library/nginx
Digest: sha256:4a97b863a4386ba588cd4f264582d1f306bc9da46fe3e02540bd171709ce09d7
Status: Image is up to date for nginx:1.13.5-alpine
—> ea7bef82810a
Successfully built ea7bef82810a
Successfully tagged registry.choerodon.com.cn/ora-zsjs/nginx-gavin:2019.10.21-170126-master
$ docker push ${DOCKER_REGISTRY}/${GROUP_NAME}/${PROJECT_NAME}:${CI_COMMIT_TAG}
The push refers to repository [registry.choerodon.com.cn/ora-zsjs/nginx-gavin]
26c677fb4aa7: Preparing
9e19e687fd42: Preparing
14604828873a: Preparing
16174e87921f: Preparing
denied: requested access to the resource is denied
ERROR: Job failed: command terminated with exit code 1

请再次尝试,谢谢