Skip to content

Auto DevOps only does Build and Test stages with multiple clusters

Summary

When setting up multiple clusters for Auto DevOps, the pipeline is missing numerous stages and only goes through the Build and Test stages.

Note: All appropriate stages were showing if setting up Auto DevOps with a single cluster.

Originally reported by prospect (internal only) ZD 106308

Steps to reproduce

Following our documentation on Auto DevOps:

  1. Create/Add 2 Kubernetes clusters. Note: when testing, we did not turn on RBAC.
  2. One cluster should have environment set to review/* and one should have environment production.
  3. Turn on Auto DevOps with continuous deployment to production.
  4. Add appropriate variables.
  5. Check CI pipeline.

Example Project

Multiple clusters only shows Build and Test stages in pipeline

In contrast, single cluster shows 4 stages in pipeline (internal only).

@danielgruesso also has a sample project. If it's public, please feel free to change the description to link to yours.

What is the current bug behavior?

Only Build and Test stages appear and run

What is the expected correct behavior?

All applicable stages (usually at least: Build, Test, Production, Performance, if not more) should be part of the pipeline.

Output of checks

This bug happens on GitLab.com 11.4.4-ee

Investigation

This issue is caused by kubernetes: active condition requiring that there is a cluster with * environment scope. See https://gitlab.com/gitlab-org/gitlab-ee/issues/8311#note_115417090. If there is no cluster with * scope, GitLab CI does not consider that condition to be fulfilled

UPDATE: Be aware that performance and dast does not have environment: name.

Links

Edited by 🤖 GitLab Bot 🤖