Skip to content

Commit

Permalink
fix: use existing Runner package for Amazon Linux 2023 as default (#1155
Browse files Browse the repository at this point in the history
)

## Description

Since #1138 was merged, the `runner_gitlab.runner_version` was wrong.
The mentioned package `15.8.2` does not exist for Amazon Linux 2023.
This PR updates the default version to `16.0.3` the oldest available
version.

You should never rely on the default value as your Runner has to match
the GitLab version. See
https://docs.gitlab.com/runner/#gitlab-runner-versions

Closes #1147 

## Migrations required

Usually not. In case you are still on GitLab < 16 you have to use the
old AMI matching `amzn2-ami-hvm-2.*-x86_64-ebs` (used before #1138 was
merged). Then you are able to still use an older version of the Runner.

## Verification

- verified that `16.0.3` is available. Installation is done via
```
  curl --fail --retry 6 -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | bash
  yum install gitlab-runner-${gitlab_runner_version} -y
```
  • Loading branch information
kayman-mk authored Jul 22, 2024
1 parent a1f8266 commit c001183
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ variable "runner_gitlab" {
ca_certificate = Trusted CA certificate bundle (PEM format).
certificate = Certificate of the GitLab instance to connect to (PEM format).
registration_token = (deprecated, This is replaced by the `registration_token` in `runner_gitlab_registration_config`.) Registration token to use to register the Runner.
runner_version = Version of the [GitLab Runner](https://gitlab.com/gitlab-org/gitlab-runner/-/releases).
runner_version = Version of the [GitLab Runner](https://gitlab.com/gitlab-org/gitlab-runner/-/releases). Make sure that it is available for your AMI. See https://packages.gitlab.com/app/runner/gitlab-runner/search?dist=amazon%2F2023&filter=rpms&page=1&q=
url = URL of the GitLab instance to connect to.
url_clone = URL of the GitLab instance to clone from. Use only if the agent can’t connect to the GitLab URL.
access_token_secure_parameter_store_name = (deprecated) The name of the SSM parameter to read the GitLab access token from. It must have the `api` scope and be pre created.
Expand All @@ -335,7 +335,7 @@ variable "runner_gitlab" {
ca_certificate = optional(string, "")
certificate = optional(string, "")
registration_token = optional(string, "__REPLACED_BY_USER_DATA__") # deprecated, removed in 8.0.0
runner_version = optional(string, "15.8.2")
runner_version = optional(string, "16.0.3")
url = optional(string, "")
url_clone = optional(string, "")
access_token_secure_parameter_store_name = optional(string, "gitlab-runner-access-token") # deprecated, removed in 8.0.0
Expand Down

0 comments on commit c001183

Please sign in to comment.