Show an Alert that a user is not using deployments [RUN ALL RSPEC] [RUN AS-IF-FOSS]

What does this MR do?

If a user edits a gitlab ci file, we try to investigate it to see if there are any environments used.

If not, a tip alert pops up suggesting users check out environments and deployments.

If the user dismisses the alert, it is permanently dismissed.

Screenshots (strongly suggested)

image

Data tracking

Sample Snowplow Event
{
  "schema":"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",
  "data":[
    {
      "schema":"iglu:com.gitlab/gitlab_standard/jsonschema/1-0-5",
      "data":{
        "environment":"development",
        "source":"gitlab-javascript",
        "plan":null,
        "extra":{
          
        }
      }
    },
    {
      "schema":"iglu:com.gitlab/gitlab_experiment/jsonschema/1-0-0",
      "data":{
        "variant":"candidate",
        "experiment":"in_product_guidance_environments_webide",
        "key":"e79d3bd83d98d3aef88d0fe5ad8e849f"
      }
    },
    {
      "schema":"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",
      "data":{
        "id":"20dbbc6b-6d28-47c1-9305-cd29f999165d"
      }
    },
    {
      "schema":"iglu:org.w3/PerformanceTiming/jsonschema/1-0-0",
      "data":{
        "navigationStart":1620054233355,
        "unloadEventStart":1620054234402,
        "unloadEventEnd":1620054234402,
        "redirectStart":0,
        "redirectEnd":0,
        "fetchStart":1620054233358,
        "domainLookupStart":1620054233358,
        "domainLookupEnd":1620054233358,
        "connectStart":1620054233358,
        "connectEnd":1620054233358,
        "secureConnectionStart":0,
        "requestStart":1620054233360,
        "responseStart":1620054234395,
        "responseEnd":1620054234396,
        "domLoading":1620054234442,
        "domInteractive":1620054235617,
        "domContentLoadedEventStart":1620054238566,
        "domContentLoadedEventEnd":1620054238569,
        "domComplete":1620054240305,
        "loadEventStart":1620054240305,
        "loadEventEnd":1620054240306
      }
    }
  ]
}
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

Related to #292747 (closed)

Edited by Andrew Fontaine