e2e: fix platform path for installing for Linux from s3 (#8708)

This commit is contained in:
Tim Gross 2020-08-21 09:20:09 -04:00 committed by GitHub
parent b23150057a
commit 693a8a2613
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -32,7 +32,7 @@ install_from_s3() {
&& echo "$NOMAD_SHA already installed" && exit 0
fi
S3_URL="s3://nomad-team-dev-test-binaries/builds-oss/nomad_linux_${NOMAD_SHA}.tar.gz"
S3_URL="s3://nomad-team-dev-test-binaries/builds-oss/nomad_${PLATFORM}_${NOMAD_SHA}.tar.gz"
aws s3 cp --quiet "$S3_URL" nomad.tar.gz
sudo tar -zxvf nomad.tar.gz -C "$INSTALL_DIR"
set_ownership

View File

@ -30,6 +30,7 @@ if (!$RunningAsAdmin) {
$install_path = "C:\opt\nomad.exe"
$platform = "windows_amd64"
Set-Location C:\opt
@ -50,7 +51,7 @@ function InstallFromS3 {
}
Try {
$key = "builds-oss/nomad_windows_amd64_${nomad_sha}.zip"
$key = "builds-oss/nomad_${platform}_${nomad_sha}.zip"
Read-S3Object -BucketName nomad-team-dev-test-binaries -Key $key -File ./nomad.zip
Remove-Item -Path $install_path -Force -ErrorAction Ignore
Expand-Archive ./nomad.zip ./ -Force
@ -107,7 +108,7 @@ function InstallFromRelease {
Try {
$releases = "https://releases.hashicorp.com"
$url = "${releases}/nomad/${nomad_version}/nomad_${nomad_version}_windows_amd64.zip"
$url = "${releases}/nomad/${nomad_version}/nomad_${nomad_version}_${platform}.zip"
Write-Output "Downloading Nomad from: $url"
Invoke-WebRequest -Uri $url -Outfile nomad.zip