mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Add a README describing the setup required for running upgrade testing via Enos. Also fix the authorization header of our `wget` to use the proper header for short-lived tokens, and the output path variable of the artifactory step. Co-authored-by: Juanadelacuesta <8647634+Juanadelacuesta@users.noreply.github.com>
27 lines
525 B
Bash
Executable File
27 lines
525 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
set -xeuo pipefail
|
|
|
|
wget --header="Authorization: Bearer $TOKEN" -O "$LOCAL_ZIP" "$URL"
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "File downloaded successfully: $LOCAL_ZIP"
|
|
else
|
|
echo "Error downloading file." >&2
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$BINARY_PATH"
|
|
unzip -o "$LOCAL_ZIP" -d "$BINARY_PATH"
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "File unzipped successfully to $BINARY_PATH"
|
|
else
|
|
echo "Error unzipping file." >&2
|
|
exit 1
|
|
fi
|
|
|
|
rm "$LOCAL_ZIP"
|