尽管 .gitlab-ci.yml 存在,但 Gitlab CI 未激活
Gitlab CI not activated although .gitlab-ci.yml exists
我最近创建了一个托管 dockerfile 的新 gitlab 项目。我想使用 Gitlab CI/CD 构建 dockerfile。
虽然我已经在另一个项目中使用了 CI/CD,但这个不会起作用。
尽管存在 .yml 文件,但 gitlab 在概述中显示 "Set up CI" link,管道 window 只显示 "get started with pipelines" link 和作业 window 说 "No jobs to show".
我的.gitlab-ci.yml 文件:
image: docker:stable
variables:
# When using dind service we need to instruct docker, to talk with the
# daemon started idnside of the service. The daemon is available with
# a network connection instead of the default /var/run/docker.sock socket.
#
# The 'docker' hostname is the alias of the service container as described at
# https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services
#
# Note that if you're using Kubernetes executor, the variable should be set to
# tcp://localhost:2375 becausde of how Kubernetes executor connects services
# to the job container
DOCKER_HOST: tcp://docker:2375/
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
DOCKER_DRIVER: overlay2
services:
- docker:dind
before_script:
- docker info
build_job:
stage: build
script:
- docker build -t Laravel-Ci-Docker-Image .
tags:
- dockerbuilder
我的 运行 这个项目的朋友:
- 活跃:是
- 受保护:无
- 可以 运行 未标记的作业:是
- 锁定到此项目:是
- 标签:dockerbuilder
- 名称:gitlab-运行ner
- 版本:11.0.0
- 修订:5396d320
- 平台:linux
- 架构:amd64
- 描述:Docker 生成器
- 上次联系:24 分钟前
已在权限部分选中 "pipelines" 选项。
我错过了什么? gitlab 无法识别 .gitlab-ci.yml 文件的可能原因是什么?
更新/更多详情
打开它显示 "This GitLab CI configuration is valid."
的 .yml 文件
这是一个自托管的 Gitlab 实例。
我认为问题出在 运行 上。
关于你的问题,你说的是一个 运行ner,最后一次联系是在 24 分钟前。
检查 运行ner 是否已经消失或 comp 是否关闭,因为 运行ner 正常工作经常检查服务器是否有作业到 运行。
如果 运行ner comp 正在工作,请检查 运行ner 服务状态。您可以使用 "gitlab-runner status" 和 "gitlab-runner list" 来完成。如果一切正常,你说的 运行ner 应该在列表中。
如果这是一个 gitlab-runner 问题,那么 CI 将处于 pending
状态,但会为此创建一个管道。我在你的 .gitlab-ci.yml
中看到的是缺少
stages:
- build
因为你在工作中定义了它,但没有创建这个阶段的定义
我最近创建了一个托管 dockerfile 的新 gitlab 项目。我想使用 Gitlab CI/CD 构建 dockerfile。
虽然我已经在另一个项目中使用了 CI/CD,但这个不会起作用。
尽管存在 .yml 文件,但 gitlab 在概述中显示 "Set up CI" link,管道 window 只显示 "get started with pipelines" link 和作业 window 说 "No jobs to show".
我的.gitlab-ci.yml 文件:
image: docker:stable
variables:
# When using dind service we need to instruct docker, to talk with the
# daemon started idnside of the service. The daemon is available with
# a network connection instead of the default /var/run/docker.sock socket.
#
# The 'docker' hostname is the alias of the service container as described at
# https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services
#
# Note that if you're using Kubernetes executor, the variable should be set to
# tcp://localhost:2375 becausde of how Kubernetes executor connects services
# to the job container
DOCKER_HOST: tcp://docker:2375/
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
DOCKER_DRIVER: overlay2
services:
- docker:dind
before_script:
- docker info
build_job:
stage: build
script:
- docker build -t Laravel-Ci-Docker-Image .
tags:
- dockerbuilder
我的 运行 这个项目的朋友:
- 活跃:是
- 受保护:无
- 可以 运行 未标记的作业:是
- 锁定到此项目:是
- 标签:dockerbuilder
- 名称:gitlab-运行ner
- 版本:11.0.0
- 修订:5396d320
- 平台:linux
- 架构:amd64
- 描述:Docker 生成器
- 上次联系:24 分钟前
已在权限部分选中 "pipelines" 选项。
我错过了什么? gitlab 无法识别 .gitlab-ci.yml 文件的可能原因是什么?
更新/更多详情
打开它显示 "This GitLab CI configuration is valid."
的 .yml 文件
这是一个自托管的 Gitlab 实例。
我认为问题出在 运行 上。
关于你的问题,你说的是一个 运行ner,最后一次联系是在 24 分钟前。 检查 运行ner 是否已经消失或 comp 是否关闭,因为 运行ner 正常工作经常检查服务器是否有作业到 运行。
如果 运行ner comp 正在工作,请检查 运行ner 服务状态。您可以使用 "gitlab-runner status" 和 "gitlab-runner list" 来完成。如果一切正常,你说的 运行ner 应该在列表中。
如果这是一个 gitlab-runner 问题,那么 CI 将处于 pending
状态,但会为此创建一个管道。我在你的 .gitlab-ci.yml
中看到的是缺少
stages:
- build
因为你在工作中定义了它,但没有创建这个阶段的定义