gitlab - /bin/sh: eval: line 98: bash: not found
问题描述
i got this
/bin/sh: eval: line 98: bash: not found
message by executing the gitlabb .yml file.
I added in the before script section the line
- apk update && apk add openssh
which was not helpful.
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
How can I resolve this issue?
解决方案
这意味着您的管道中使用的图像之一没有安装 bash。
尝试将行更改before_script
为./docker_install.sh > /dev/null
(确保docker_install.sh
事先设置了执行权限)。
推荐阅读
- java - java Nashorn 中的默认方法是在实际方法不存在时调用的吗?
- java - Android Gradle 5.0 更新:原因:org.jetbrains.plugins.gradle.tooling.util
- ios - IOS Universal Links 或 URL Scheme 在应用程序之间共享信息
- java - 如何为我想在 java 中调用的这个 MySQL 查询创建存储过程
- javascript - 如何在不“切换”电子应用程序的情况下将窗口放在前面?
- catia - 您如何测量最大尺寸?
- search - Solr 7.5 节点添加事件行为
- python - Jupyter notebook 中的 IPython:回忆之前的命令
- python - 在python中替换部分字符串
- web2py - 为什么我的 CSV 导出未将表示应用于引用的字段