Skip to content

Track YAML-less Auto DevOps inclusions separately

What does this MR do?

In !51391 (merged) we added tracking for include:template. Unfortunately, YAML-less Auto DevOps also uses include:template for Auto-DevOps.gitab-ci.yml, making it currently impossible to differentiate .gitlab-ci.yml template usage from implicit usage in our numbers.

This changes it so that pipelines from the auto_devops_source config source (i.e. YAML-free Auto DevOps pipelines) are counted separately

Screenshots (strongly suggested)

Running an implicit Auto DevOps pipeline locally, get the following redis keys:

redis ../redis/redis.socket> keys *ci_templates*
1) "p_{ci_templates}_implicit_auto_devops_deploy-2021-06"
2) "p_{ci_templates}_implicit_auto_devops-2021-06"
3) "p_{ci_templates}_implicit_security_secret_detection-2021-06"
4) "p_{ci_templates}_implicit_security_sast-2021-06"
5) "p_{ci_templates}_implicit_auto_devops_build-2021-06"

Then, running an explicit (include:template) Auto DevOps pipeline, we get another set of 5 keys (highlighted below):

  redis ../redis/redis.socket> keys *ci_templates*
   1) "p_{ci_templates}_implicit_auto_devops_deploy-2021-06"
+  2) "p_{ci_templates}_security_sast-2021-06"
   3) "p_{ci_templates}_implicit_auto_devops-2021-06"
+  4) "p_{ci_templates}_auto_devops_deploy-2021-06"
+  5) "p_{ci_templates}_auto_devops-2021-06"
   6) "p_{ci_templates}_implicit_security_secret_detection-2021-06"
   7) "p_{ci_templates}_implicit_security_sast-2021-06"
   8) "p_{ci_templates}_implicit_auto_devops_build-2021-06"
+  9) "p_{ci_templates}_security_secret_detection-2021-06"
+ 10) "p_{ci_templates}_auto_devops_build-2021-06"

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Hordur Freyr Yngvason

Merge request reports