Bash execution error in pipeline template

This is a trivial question, but it seems that I am not able to figure out what is happening.

I am trying to execute a bash script from the pipeline, but I get the following error:
{message:404 File Not Found}: command not found

This is how the .yml looks like:

  stage: build
    name: ...
    - ....
    - curl -o ...
    - chmod 777
    - more
    - type bash
    - ./

And the result in the log:

$ curl -o ...
Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 32 100 32 0 0 147 0 --:--:-- --:--:-- --:--:-- 147

$ chmod 777

$ type bash
bash is /usr/bin/bash

$ more

{"message":"404 File Not Found"}$ ./
./ line 1: {message:404 File Not Found}: command not found


echo "hello"

Why the bash script execution does not work?
The bash file is there, it does not contain any special command.

Maybe the bash context that is provided by GitLab is not correct?

Why the more command does not show the correct file content?

This script section in the pipeline file is executed in a strange way.
What I missed?


look strange. Which image are you using to execute the jobs? The 404 message looks like the error message from curl, which gets directed into from the streamed download. What happens if you run curl without the -o parameter?

Regarding more - this prints to stdout and waits for user input, which is not available in a runner execution context.


You were right. The 404 message comes from the curl command. I need to use the -o param because without it the filename on the disk will be not correct.

Anyway, after the curl command was fixed the 404 message dissapeared.

Thx for the help.