chore(e2e): Remove go version variable (#6524)

pull/6559/head
Michael Li 6 days ago committed by GitHub
parent cb8edfc926
commit 0ad2bb65dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -410,7 +410,6 @@ jobs:
uses: ./.github/workflows/enos-run.yml
with:
artifact-name: "boundary_${{ needs.set-product-version.outputs.product-version }}_linux_amd64.zip"
go-version: ${{ needs.product-metadata.outputs.go-version }}
edition: ${{ needs.product-metadata.outputs.product-edition }}
docker-image-file: "boundary_default_linux_amd64_${{ needs.set-product-version.outputs.product-version }}_${{ github.sha }}.docker.dev.tar"
secrets: inherit

@ -12,9 +12,6 @@ on:
edition:
required: true
type: string
go-version:
required: true
type: string
docker-image-file:
required: false
type: string
@ -29,10 +26,17 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: '0'
- name: Determine Go version
id: get-go-version
# We use .go-version as our source of truth for current Go
# version, because "goenv" can react to it automatically.
run: |
echo "Building with Go $(cat .go-version)"
echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- name: Set up Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version: ${{ inputs.go-version }}
go-version: "${{ steps.get-go-version.outputs.go-version }}"
cache: false
- name: Determine Go cache paths
id: go-cache-paths
@ -89,7 +93,6 @@ jobs:
ENOS_VAR_test_email: ${{ secrets.SERVICE_USER_EMAIL }}
ENOS_VAR_boundary_edition: ${{ inputs.edition }}
ENOS_VAR_boundary_docker_image_file: ./support/boundary_docker_image.tar
ENOS_VAR_go_version: ${{ inputs.go-version }}
ENOS_VAR_gcp_project_id: ${{ secrets.GCP_PROJECT_ID_CI }}
ENOS_VAR_gcp_client_email: ${{ secrets.GCP_CLIENT_EMAIL_CI }}
ENOS_VAR_gcp_private_key_id: ${{ secrets.GCP_PRIVATE_KEY_ID_CI }}
@ -97,10 +100,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Determine Go version
id: get-go-version
# We use .go-version as our source of truth for current Go
# version, because "goenv" can react to it automatically.
run: |
echo "Building with Go $(cat .go-version)"
echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- name: Set up Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version: ${{ inputs.go-version }}
go-version: "${{ steps.get-go-version.outputs.go-version }}"
cache: false
- name: Set up Go modules cache
id: go-mod-cache

@ -106,9 +106,7 @@ scenario "e2e_docker_base_connect" {
]
variables {
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_connect"
docker_mirror = var.docker_mirror
network_name = step.create_docker_network.network_name
go_version = var.go_version
debug_no_run = var.e2e_debug_no_run
alb_boundary_api_addr = step.create_boundary.address
auth_method_id = step.create_boundary.auth_method_id

@ -119,10 +119,8 @@ scenario "e2e_docker_base_plus" {
]
variables {
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_plus"
docker_mirror = var.docker_mirror
controller_container_name = step.create_boundary.container_name
network_name = step.create_docker_network.network_name
go_version = var.go_version
debug_no_run = var.e2e_debug_no_run
alb_boundary_api_addr = step.create_boundary.address
auth_method_id = step.create_boundary.auth_method_id

@ -113,9 +113,7 @@ scenario "e2e_docker_base_with_gcp" {
]
variables {
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/gcp"
docker_mirror = var.docker_mirror
network_name = step.create_docker_network.network_name
go_version = var.go_version
debug_no_run = var.e2e_debug_no_run
alb_boundary_api_addr = step.create_boundary.address
auth_method_id = step.create_boundary.auth_method_id

@ -129,9 +129,7 @@ scenario "e2e_docker_base_with_vault" {
]
variables {
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_with_vault"
docker_mirror = var.docker_mirror
network_name = step.create_docker_network.network_name
go_version = var.go_version
debug_no_run = var.e2e_debug_no_run
alb_boundary_api_addr = step.create_boundary.address
auth_method_id = step.create_boundary.auth_method_id

@ -165,9 +165,7 @@ scenario "e2e_docker_base_with_worker_version" {
]
variables {
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_with_worker"
docker_mirror = var.docker_mirror
network_name = step.create_docker_network_cluster.network_name
go_version = var.go_version
debug_no_run = var.e2e_debug_no_run
alb_boundary_api_addr = step.create_boundary.address
auth_method_id = step.create_boundary.auth_method_id

@ -160,9 +160,7 @@ scenario "e2e_docker_base_with_worker" {
]
variables {
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_with_worker"
docker_mirror = var.docker_mirror
network_name = step.create_docker_network_cluster.network_name
go_version = var.go_version
debug_no_run = var.e2e_debug_no_run
alb_boundary_api_addr = step.create_boundary.address
auth_method_id = step.create_boundary.auth_method_id

@ -106,9 +106,7 @@ scenario "e2e_docker_base" {
]
variables {
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base"
docker_mirror = var.docker_mirror
network_name = step.create_docker_network.network_name
go_version = var.go_version
debug_no_run = var.e2e_debug_no_run
alb_boundary_api_addr = step.create_boundary.address
auth_method_id = step.create_boundary.auth_method_id

@ -175,9 +175,7 @@ scenario "e2e_docker_worker_registration_controller_led" {
]
variables {
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_with_worker"
docker_mirror = var.docker_mirror
network_name = step.create_docker_network_cluster.network_name
go_version = var.go_version
debug_no_run = var.e2e_debug_no_run
alb_boundary_api_addr = step.create_boundary.address
auth_method_id = step.create_boundary.auth_method_id

@ -190,9 +190,7 @@ scenario "e2e_docker_worker_registration_worker_led" {
]
variables {
test_package = "github.com/hashicorp/boundary/testing/internal/e2e/tests/base_with_worker"
docker_mirror = var.docker_mirror
network_name = step.create_docker_network_cluster.network_name
go_version = var.go_version
debug_no_run = var.e2e_debug_no_run
alb_boundary_api_addr = step.create_boundary.address
auth_method_id = step.create_boundary.auth_method_id

@ -199,12 +199,6 @@ variable "aws_region" {
default = "us-east-1"
}
variable "go_version" {
description = "Version of Golang used by the application under test"
type = string
default = ""
}
variable "hcp_boundary_cluster_id" {
description = "ID of the Boundary cluster in HCP"
type = string
@ -288,4 +282,4 @@ variable "worker_version" {
description = "Manually set worker version to test different worker/controller version combinations"
type = string
default = null
}
}

@ -14,10 +14,6 @@ terraform {
}
}
variable "docker_mirror" {
description = "URL to the docker repository"
type = string
}
variable "network_name" {
description = "Name of Docker Network"
type = string
@ -27,11 +23,6 @@ variable "controller_container_name" {
type = string
default = ""
}
variable "go_version" {
description = "Version of Golang used by the application under test"
type = string
default = ""
}
variable "debug_no_run" {
description = "If set, this module will not execute the tests so that you can still access environment variables"
type = bool
@ -301,29 +292,15 @@ variable "gcp_host_set_ips" {
default = [""]
}
resource "enos_local_exec" "get_go_version" {
count = var.go_version == "" ? 1 : 0
inline = ["cat $(echo $(git rev-parse --show-toplevel))/.go-version | xargs"]
}
locals {
go_version = var.go_version == "" ? enos_local_exec.get_go_version[0].stdout : var.go_version
image_name = trimspace("${var.docker_mirror}/library/golang:${local.go_version}")
aws_ssh_private_key_path = abspath(var.aws_ssh_private_key_path)
package_name = reverse(split("/", var.test_package))[0]
}
resource "docker_image" "go" {
name = local.image_name
keep_locally = true
}
resource "enos_local_exec" "run_e2e_test" {
depends_on = [docker_image.go]
environment = {
TEST_PACKAGE = var.test_package
TEST_TIMEOUT = var.test_timeout
TEST_RUNNER_IMAGE = docker_image.go.image_id
TEST_NETWORK_NAME = var.network_name
E2E_TESTS = "true"
BOUNDARY_ADDR = var.alb_boundary_api_addr

Loading…
Cancel
Save