5
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GitLab CI で bash のスクリプトが実行できない

Posted at

現象

以下のような JOB を GitLab CI で実行した

job.yml
build:
  image: python:alpine
  stage: build
  when: manual
  script:
    - ./script.sh

すると、以下のようなエラーが発生

/bin/sh: eval: line 113: ./script.sh: not found

原因/対処

使用している image に bash が含まれていないため発生していた。
script の中で bash をインストールしたら解決した。

job.yml
build:
  image: python:alpine
  stage: build
  when: manual
  script:
   - apk add bash
   - ./script.sh

参考

5
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?