chore(e2e): Add some dependencies for RDP automation
* added dependencies for automation
This commit is contained in:
1 parent
0ac6b73414
commit
725093f8d8
6 files changed
+46
-2
No files matched your search
@@ -112,6 +112,7 @@ scenario "e2e_aws_rdp_base" {
|
||||
client_version = matrix.client
|
||||
boundary_cli_zip_path = step.build_boundary_windows.artifact_path
|
||||
boundary_src_path = local.local_boundary_src_dir
|
||||
github_token = var.github_token
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -271,3 +271,9 @@ variable "windows_instance_type" {
|
||||
type = string
|
||||
default = "m7i-flex.xlarge"
|
||||
}
|
||||
|
||||
variable "github_token" {
|
||||
description = "github token needed to run automated tests (requires read access to hashicorp repos)"
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
+6
-1
@@ -73,7 +73,7 @@
|
||||
// if running GCP scenarios. This should not be used in combination with gcp_private_key_path.
|
||||
// gcp_private_key = ""
|
||||
|
||||
// The GCP private_key_id. Only needed if running GCP scenarios.
|
||||
// The GCP private_key_id. Only needed if running GCP scenarios.
|
||||
// gcp_private_key_id = ""
|
||||
|
||||
// The GCP client_email used to authenticate with GCP
|
||||
@@ -91,3 +91,8 @@
|
||||
// The directory that contains the source code of boundary-ui. This is used for
|
||||
// front-end e2e testing (UI scenarios) in CI. Only needed if e2e_debug_no_run = false.
|
||||
// local_boundary_ui_src_dir = "/Users/<user>/Developer/boundary-ui"
|
||||
|
||||
// Github token to load go modules on windows client
|
||||
// only required for running automation on RDP e2e test cases
|
||||
// Token requires read access to hashicorp repositories
|
||||
// github_token = ""
|
||||
@@ -285,6 +285,10 @@ resource "enos_local_exec" "wait_for_ssh" {
|
||||
inline = ["timeout 600s bash -c 'until ssh -i ${abspath(local_sensitive_file.private_key.filename)} -o BatchMode=Yes -o IdentitiesOnly=yes -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no Administrator@${aws_instance.client.public_ip} \"echo ready\"; do sleep 10; done'"]
|
||||
}
|
||||
|
||||
resource "enos_local_exec" "get_go_version" {
|
||||
inline = ["cat $(echo $(git rev-parse --show-toplevel))/.go-version | xargs"]
|
||||
}
|
||||
|
||||
resource "enos_local_exec" "make_dir" {
|
||||
count = var.boundary_cli_zip_path != "" ? 1 : 0
|
||||
depends_on = [
|
||||
@@ -333,6 +337,8 @@ resource "local_file" "powershell_script" {
|
||||
content = templatefile("${path.module}/scripts/setup.ps1", {
|
||||
boundary_cli_zip_path = "${local.test_dir}/${basename(local.boundary_cli_zip_path)}"
|
||||
boundary_src_zip_path = "${local.test_dir}/${basename(archive_file.boundary_src_zip[0].output_path)}"
|
||||
go_version = "${enos_local_exec.get_go_version.stdout}"
|
||||
github_token = "${var.github_token}"
|
||||
})
|
||||
filename = "${path.root}/.terraform/tmp/setup_windows_client.ps1"
|
||||
}
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
$destination = Split-Path -Path ${boundary_cli_zip_path}
|
||||
Expand-Archive -Path ${boundary_cli_zip_path} -DestinationPath $destination -Force
|
||||
|
||||
# Unzip boundary src to new directory
|
||||
$base = [System.IO.Path]::GetFileNameWithoutExtension("${boundary_src_zip_path}")
|
||||
$src_destination = Join-Path (Split-Path ${boundary_src_zip_path}) $base
|
||||
Expand-Archive -Path ${boundary_src_zip_path} -DestinationPath $src_destination -Force
|
||||
|
||||
# Add Boundary CLI to PATH
|
||||
$existingPath = [Environment]::GetEnvironmentVariable(
|
||||
"Path",
|
||||
@@ -28,4 +33,19 @@ Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1"
|
||||
refreshenv
|
||||
|
||||
# install mremoteng
|
||||
choco install mremoteng -y
|
||||
choco install mremoteng -y
|
||||
|
||||
choco install golang -y --version ${go_version}
|
||||
refreshenv
|
||||
choco install git -y
|
||||
refreshenv
|
||||
choco install mingw -y
|
||||
refreshenv
|
||||
# needs cmake >3.7 and <4.0
|
||||
choco install cmake --version 3.31.8 -y
|
||||
refreshenv
|
||||
|
||||
# Set the github token if provided
|
||||
if ("${github_token}" -ne "") {
|
||||
git config --system url."https://oauth2:${github_token}@github.com".insteadOf "https://github.com"
|
||||
}
|
||||
@@ -47,3 +47,9 @@ variable "boundary_src_path" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "github_token" {
|
||||
description = "Github token needed to run automated tests. Token requires read access to hashicorp repositories"
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
Reference in new issue
Block a user