Gitlab Runner 在服务器 OS 上调用 before_script 而不是 Docker 图片
Gitlab Runner Calling before_script on server OS not Docker Image
我刚刚设置了一个 GitLab runner 并尝试了 运行 一个作业但是它失败了并且返回的错误是
$ apt-get update -yqq
bash: line 92: apt-get: command not found
我的 .gitlab.yml
看起来像这样:
image: ubuntu:latest
cache:
paths:
- vendor/
before_script:
- apt-get update -yqq
- docker-php-ext-install mbstring mcrypt pdo_pgsql curl json intl gd xml zip bz2 opcache
stages:
- test
# We test PHP7 with MySQL, but we allow it to fail
test:
script:
- ./vendor/bin/phpunit
allow_failure: false
奇怪的是,我 运行 所在的服务器是 Redhat 服务器,当我将更新命令更改为 yum update
时,它似乎可以正常工作。
您需要 configure 您的跑步者才能使用 Docker executor
才能在您的 .gitlab-ci.yml
中使用 image
关键字
我刚刚设置了一个 GitLab runner 并尝试了 运行 一个作业但是它失败了并且返回的错误是
$ apt-get update -yqq
bash: line 92: apt-get: command not found
我的 .gitlab.yml
看起来像这样:
image: ubuntu:latest
cache:
paths:
- vendor/
before_script:
- apt-get update -yqq
- docker-php-ext-install mbstring mcrypt pdo_pgsql curl json intl gd xml zip bz2 opcache
stages:
- test
# We test PHP7 with MySQL, but we allow it to fail
test:
script:
- ./vendor/bin/phpunit
allow_failure: false
奇怪的是,我 运行 所在的服务器是 Redhat 服务器,当我将更新命令更改为 yum update
时,它似乎可以正常工作。
您需要 configure 您的跑步者才能使用 Docker executor
才能在您的 .gitlab-ci.yml
image
关键字