Skip to content

fail: command not found

Describe the bug

Pipeline fails with

$ # BEGSCRIPT # collapsed multi-line command
[INFO] Processing scoped variables...
[INFO] ... done
main: line 484: fail: command not found
Uploading artifacts for failed job
00:01
Uploading artifacts...

Expected behavior

Shows an error in case of a fail.

Logs and/or screenshots

(Join any relevant logs and/or screenshot. Please use code blocks (```) to format console output, logs, and code.)

Context & Configuration

Link to a project, pipeline or job facing the bug: (please provide one if possible)

The issue was reproduced using:

  • Version of the template: 3.11.1
  • GitLab server(s): self managed
  • GitLab runner(s): 16.6.1, Linux

Here is the .gitlab-ci.yml file:

# Add your .gitlab-ci.yml here, if applicable and useful.

(If useful, list configured GitLab CI project and/or group variables.)

Configured GitLab CI project or group variables:

  • VARIABLE_1
  • VARIABLE_2
  • ...

The function fail was not added properly. Adding it should fix this.