Loading
chore: install acc tests external providers from a mirror
What does this MR do?
Acceptance tests that use ExternalProviders download old gitlabhq/gitlab and hashicorp/time releases from the Terraform Registry (which redirects to GitHub) during terraform init. A slow or throttled request fails the test and the whole job.
This MR builds those releases into the CI image instead:
.gitlab/ci/external-providers.txtlists the provider versions the tests need.- The Dockerfile downloads them into
/usr/share/terraform/providerswhen the image is built. .gitlab/ci/terraformrcmakes Terraform install these two providers only from that directory. It's enabled in.testaccviaTF_CLI_CONFIG_FILE, so local test runs are unchanged.TestExternalProvidersAreMirrored(unit test) fails if anyExternalProviderssource or version constraint isn't covered by the list. That way a missing entry is caught ingo:test, not partway through the 2-hour acceptance job.
How to verify
TestAccGitlabGroupLabel_schemaMigrationV1toV2passes with no requests to the registry or GitHub in Terraform's debug log.- With networking disabled in the image,
terraform initinstalls the expected version for each constraint.
Closes #6875 (closed)