Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

build running automatically in gitlab

I have installed GitLab in Ubuntu 18.04 and moved it over to Apache. When I create a new project, with the initial commit (or any commit after) it tries to run a build. Of course this isn't going to work, as there are no build scripts available, and I never want it to build on commit, I want to create my own script to deploy the project on demand. So the questions:

1) How do I stop a new project trying to build?

2) If a commit fails, how do I clear the error in the main projects page?? (its a commit fail error)

3) In the GitLab web interface, how can I have a button to start a build/deploy?

like image 939
MicWit Avatar asked Oct 07 '18 06:10

MicWit


2 Answers

1) Possible Scenario why auto build starts:

  1. You have a .gitlab-ci.yml file in your repository root
  2. You have turned on AutoDevOps for your project/group/everything...

2) No Way, Although You can skip or run build on specific branch only

3) Gitlab has a option to run jobs manually. https://docs.gitlab.com/ee/ci/yaml/#when-manual. It will give a button on WebUI.

like image 98
Anwar Hossain Avatar answered Sep 29 '22 22:09

Anwar Hossain


On 1), it might be GitLab's Auto Devops being enabled automatically.

If you do not use CI on your project, you should probably consider doing it. In any case, you can disable it globally:

  1. Log in as root on your GitLab instance
  2. Go to Admin Area > Settings > Continuous Integration and Deployment
  3. Click the Expand button
  4. Untick Default to Auto DevOps pipeline for all projects

I have not tried this myself, but quoting community member Stayen on the GitLab forum, you can also disable CI on a single project basis:

To disable per a single project, as far as I know, disabling Pipelines from “Settings > CI” works as well.

See these posts at the GitLab Forum for more context:

  • https://forum.gitlab.com/t/pipeline-nnn-has-failed-for-master-how-to-disable-ci-for-a-project/19683
  • https://forum.gitlab.com/t/should-auto-devops-be-disabled-by-default/19631
  • https://forum.gitlab.com/t/autodevops-running-automatically/19626/2
like image 27
David Planella Avatar answered Sep 29 '22 22:09

David Planella