question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GitLab CI/CD is being triggered without a .gitlab-ci.yml file

See original GitHub issue

Describe the bug

GitLab CI/CD is being triggered without a .gitlab-ci.yml file or any specific setup in GitLab

To Reproduce

Create a site with the preact-cli template. That will create a repo in your personal GitLab (but I wanted mine to be in a GitLab group). Move the GitLab repo into a group. Create a new Netlify site for the newly named repo (which is now in a group). Turn on identity and the git gateway in Netlify for the new site. Invite someone to edit and make a change to the site from within the https://site.netlify.app/admin panel.

Expected behavior

As far as I’m aware, the build is supposed to occur within Netlify, not in GitLab, right?

I don’t think this was happening until I moved the repo into the group and created the new site in Netlify.

Screenshots

GitLab: Capture

Repo: files

Applicable Versions:

  • Netlify CMS version: netlify-cms-app 2.15.9, bootstrap.js:83 netlify-cms-core 2.40.5, index.js:27 netlify-cms 2.10.129
  • Git provider: GitLab
  • OS: N/A
  • Browser version N/A
  • Node.JS version: N/A

CMS configuration

backend:
  name: git-gateway
  branch: master
media_folder: src/assets
public_folder: /assets
collections:
  - name: "pages"
    label: "Pages"
    label_singular: "Page" # Used in the UI, ie: "New Post"
    folder: "content/blog"
    create: true
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Publish Date", name: "date", widget: "datetime" }
      - { label: "Subtitle", name: "subtitle", widget: "string", required: false }
      - { label: "Cover", name: "cover", widget: "image", required: false }
      - { label: "Tags", name: "tags", widget: "string" }
      - { label: "Body", name: "body", widget: "markdown" }

Additional context

I think I have 2 Netlify CMS sites pointing to the same repo (the original site and the new site). Would that affect anything?

I feel as though Netlify CMS is manually triggering the build via an API call, perhaps? I don’t think I have anything in GitLab that would cause a CI/CD to get triggered.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
paridigmcommented, Jun 5, 2021

Turns out it was just a problem with GitLab’s recent credit card validation system that just so happened to start right when I created the other project in Netlify.

Reply from GitLab support:

The issue you’ve described is a known issue with our new credit card validation. The validation and pipeline shouldn’t be running if you do not have a .gitlab-ci.yml so this is indeed unintentional and shouldn’t affect your repository otherwise.

If you are not using CI/CD, you can disable it by going to Settings > General > Visibility, project features, permissions > CI/CD. I hope that information helps! Please let us know if you have any additional questions or concerns.

Known issue link: https://gitlab.com/gitlab-org/gitlab/-/issues/331959

Good news is that there is a setting in GitLab to prevent it from happening!

1reaction
paridigmcommented, May 27, 2021

It seems like the pipeline doesn’t even start at all due to the error, so I don’t think any logs even exist for the pipeline. 🤔

I actually submitted a GitLab support ticket yesterday, so we shall see what they find out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

CI Pipelines Can't Run without .gitlab-ci.yml File on Master ...
It is not possible to run CI pipelines for a branch with a .gitlab-ci.yml file without a .gitlab-ci.yml file on the master branch....
Read more >
Troubleshooting CI/CD - GitLab Docs
The pipeline shows a yaml invalid badge and does not start running if any syntax or formatting problems are found. Edit .gitlab-ci.yml with...
Read more >
Disabling GitLab CI/CD
Existing jobs and pipelines are hidden, not removed. To disable GitLab CI/CD in your project: On the top bar, select Main menu >...
Read more >
`.gitlab-ci.yml` keyword reference - GitLab Docs
Documentation for GitLab Community Edition, GitLab Enterprise Edition, Omnibus GitLab, and GitLab Runner.
Read more >
The `.gitlab-ci.yml` file - GitLab Docs
Application code hosted in a Git repository. · A file called .gitlab-ci.yml in the root of your repository, which contains the CI/CD configuration....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found