Skip to content
Snippets Groups Projects

Add CI variables for Google Cloud Artifact Registry integration

Merged 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

Merged results pipeline #1169899346 passed

Pipeline: Ruby 3.1 as-if-foss pipeline

#1169904263

    Pipeline: TRIGGERED_EE_PIPELINE

    #1169928429

      Pipeline: GitLab

      #1169905456

        +2

        Merged results pipeline passed for 154be036

        Test coverage 81.50% (16.66%) from 2 jobs

        Merged by Furkan AyhanFurkan Ayhan 1 year ago (Feb 8, 2024 7:39pm UTC)

        Loading

        Pipeline #1170018140 passed

        Pipeline passed for 0d7dd6b0 on master

        Test coverage 64.81% (16.66%) from 2 jobs
        10 environments impacted.

        Activity

        Filter activity
        • Approvals
        • Assignees & reviewers
        • Comments (from bots)
        • Comments (from users)
        • Commits & branches
        • Edits
        • Labels
        • Lock status
        • Mentions
        • Merge request status
        • Tracking
        Please register or sign in to reply
        Loading