特定分支生成器上的GitLab CI管道:未找到命令

特定分支生成器上的GitLab CI管道:未找到命令,gitlab,gitlab-ci,Gitlab,Gitlab Ci,我正在尝试实现GitLab CI管道来构建和部署应用程序 在我们的项目中,我们有两个分支:master和others。 对于一个特定的分支(例如:p-01-sprint-04),我想运行一个管道来构建应用程序并在测试环境中部署构建 生成在执行期间失败 这就是我的.gitlab ci.yml的样子: stages: - test unit_test: stage: test script: - composer install - php artisan migrat

我正在尝试实现GitLab CI管道来构建和部署应用程序

在我们的项目中,我们有两个分支:master和others。 对于一个特定的分支(例如:p-01-sprint-04),我想运行一个管道来构建应用程序并在测试环境中部署构建

生成在执行期间失败

这就是我的
.gitlab ci.yml
的样子:

stages:
  - test

unit_test:
  stage: test
  script:
    - composer install
    - php artisan migrate
    - php artisan db:seed
    - composer require laravel/passport
    - php artisan passport:client --personal
    - php artisan storage:link
    - php artisan serve
生成失败,出现以下错误:

Running with gitlab-runner 11.8.0 (4745a6f3)
  on gitlab-runner-gitlab-runner-64c48b5865-wx6wl BS2DZ3GP
Using Kubernetes namespace: gitlab
Using Kubernetes executor with image ubuntu:16.04 ...
Waiting for pod gitlab/runner-bs2dz3gp-project-924-concurrent-0tzq4t to be running, status is Pending
Waiting for pod gitlab/runner-bs2dz3gp-project-924-concurrent-0tzq4t to be running, status is Pending
Running on runner-bs2dz3gp-project-924-concurrent-0tzq4t via gitlab-runner-gitlab-runner-64c48b5865-wx6wl...
Cloning into '/mk2/billeterie/bo'...
Cloning repository...
Checking out 841a7daf as p-01-sprint-04...
Skipping Git submodules setup
$ composer install
/bin/bash: line 72: composer: command not found
ERROR: Job failed: command terminated with exit code 1

日志显示您使用
ubuntu:16.04
kubernetes
executor:

Using Kubernetes executor with image ubuntu:16.04 ...
composer
未安装在
ubuntu:16.04
docker映像中


使用
composer
,它提供
php
composer
二进制文件。

您能指导我如何将其更改为composer图像在gitlab-ci.yml中指定
图像:composer
就在
单元测试:
的下方