Skip to content

Add CI variables for Google Cloud Artifact Registry integration

João Pereira requested to merge gar-ci-vars into master

What does this MR do and why?

Related to GAR Integration: Add predefined CI variables (#425153 - closed). This change introduces three new CI environment variables which are only present if the Google Cloud Artifact Registry project integration (!141127 (merged)) is enabled.

This change does not include any documentation yet. We're going to introduce documentation for this integration later on, as part of #425158 (closed).

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

image image

How to set up and validate locally

  1. First we need to setup the Google Cloud Artifact Registry project integration (that this change depends on) as explained in !141127 (merged):

    1. Simulate a SaaS instance in the local GDK. Note that this is an EE feature.

    2. Enable the feature flag in the rails console:

      Feature.enable(:gcp_artifact_registry)
    3. Visit Project > Settings > Integrations

    4. Choose to configure Google Cloud Platform Artifact Registry integration

    5. Fill the form with random strings (no need for proper values for test purposes) and enable the integration.

    6. The new integration should appear in the list of active integrations.

  2. Now we can setup the actual test for this change:

    1. Make sure your GDK is setup correctly for Runner;
    2. Create or edit the .gitlab-ci.yml file on your test project so that it includes a job like this:
      test:
        script:
          - env | grep GOOGLE_ARTIFACT_REGISTRY
    3. Merge the change and inspect the job result. Should look something like the screenshot shared above (edit: I've renamed the vars since the screenshot was taken).
Edited by João Pereira

Merge request reports