Pipeline has failed message

Hello all

I have uploaded my website files to gitlab which is connected to digitalocean.

When I make changes in the website-files and upload them I get the following error:

When I check online the changes are live, so I dont understand why I get this error-message?

Thanks for any help!

Thomas

Hi @fundamentum

your repository must have a file called .gitlab-ci.yml which defines a pipeline. This is a set of tasks that are run by GitLab every time you make a change and push that change to GitLab.

The contents of .gitlab-ci.yml define exactly what commands are run, and under what circumstances.

To find out what caused your pipeline failure, click on the link to build that you can see in the screenshot, and that will take you to a log of the build job.

My guess is that you might be missing some variables such as an API token that allows you to connect to Digital Ocean, or that your .gitlab-ci.yml contains a bug somewhere.

Good luck!

Hello
Thanks for your guidance. I investigated further based on your inputs and found the reason:

No related merge requests found.

How can I solve this?

Thank you -

Thomas

Relatively recently, GitLab introduced different sorts of pipelines for merge requests, and for branches (when a merge request is not present).

I think what you probably need is to put this in your .gitlab-ci.yml file:

workflow:
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
    - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS'
      when: never
    - if: '$CI_COMMIT_BRANCH'

If that doesn’t work, maybe you could post your .gitlab-ci.yml file along with the errors you are getting?

1 Like