/ bin / sh:评估:第98行:bash:找不到

时间:2020-08-30 09:20:33

标签: gitlab gitlab-ci gitlab-ci-runner

我明白了

/bin/sh: eval: line 98: bash: not found 

通过执行gitlabb .yml文件进行消息。

我在脚本之前部分添加了这一行

- apk update && apk add openssh

这没有帮助。

before_script:
  - apk update && apk add openssh
  - bash docker_install.sh > /dev/null

stages:
  - build
  - deploy
  - loadtest-local

build:
  stage: build
  script:
    - echo "building my application in ubuntu container..."

deploy:
  stage: deploy
  image: php:7.4
  script: 
    - phpunit Unittest.php
    

loadtest-local:
  image: 
    name: loadimpact/k6:latest
    entrypoint: [""]
  stage: loadtest-local
  script:
    - k6 run ./loadtests/performance-test.js
    - k6 run ./loadtests/inttest.js

如何解决此问题?

1 个答案:

答案 0 :(得分:1)

这意味着您的管道中使用的图像之一未安装bash。

尝试将before_script上的行更改为./docker_install.sh > /dev/null(确保docker_install.sh事先设置了执行权限)。