Skip to content

New users shouldn't get a failed pipeline warning without having a gitlab-ci.yml file

Problem

With the recent change to require credit cards on file for new users that are running pipelines, we are triggering failed pipeline warnings for simple commits on projects that do not have auto-devops enabled or a gitlab-ci.yml file in the repository.

To recreate:

  1. Create a new free gitlab.com account
  2. Create a project and initialize with a readme
  3. Notice that you get a pipeline failure in the UI as well as receive an email for the pipeline failure.

You can see this on my own public project that I used for testing: https://gitlab.com/mkcitest/pipelinetest

Here is a video I recorded as well: https://www.loom.com/share/66f09de0c8df49e88e20b00435a049a7

Expected behavior

Users without a gitlab-ci.yml file or auto-devops enabled should not see pipeline failure notifications.

Screenshots

Notice the pipeline failure on Update README.md but that auto-devops is not enabled and there isn't a gitlab-ci.yml file in the repo.

image

image

image

Proposal

  1. Restrict credit card validation and message to only commits only associated with pipelines

We should move the credit card check lower in the chain of commands when creating a pipeline

SEQUENCE = [Gitlab::Ci::Pipeline::Chain::Build,
                Gitlab::Ci::Pipeline::Chain::Build::Associations,
                Gitlab::Ci::Pipeline::Chain::Validate::Abilities, # <-- check is currently here
                Gitlab::Ci::Pipeline::Chain::Validate::Repository,
                Gitlab::Ci::Pipeline::Chain::Validate::SecurityOrchestrationPolicy,
                Gitlab::Ci::Pipeline::Chain::Config::Content, # <-- here we check for presence of YAML
                Gitlab::Ci::Pipeline::Chain::Config::Process, # <-- check could be moved anywhere from here
                Gitlab::Ci::Pipeline::Chain::RemoveUnwantedChatJobs, 
                Gitlab::Ci::Pipeline::Chain::Skip,
                Gitlab::Ci::Pipeline::Chain::SeedBlock,
                Gitlab::Ci::Pipeline::Chain::EvaluateWorkflowRules,
                Gitlab::Ci::Pipeline::Chain::Seed,
                Gitlab::Ci::Pipeline::Chain::Limit::Size,
                Gitlab::Ci::Pipeline::Chain::Limit::Deployments,
                Gitlab::Ci::Pipeline::Chain::Validate::External,
                Gitlab::Ci::Pipeline::Chain::Populate,
                Gitlab::Ci::Pipeline::Chain::StopDryRun,
                Gitlab::Ci::Pipeline::Chain::Create,
                Gitlab::Ci::Pipeline::Chain::Limit::Activity,
                Gitlab::Ci::Pipeline::Chain::Limit::JobActivity,
                Gitlab::Ci::Pipeline::Chain::CancelPendingPipelines,
                Gitlab::Ci::Pipeline::Chain::Metrics,
                Gitlab::Ci::Pipeline::Chain::TemplateUsage,
                Gitlab::Ci::Pipeline::Chain::Pipeline::Process].freeze
Edited by Michael Karampalas