Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Test pre-submits #16044

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions pkg/model/resources/nodeup.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function ensure-install-dir() {

# Retry a download until we get it. args: name, sha, urls
download-or-bust() {
echo "Downloading \"$1\" from \"$3\" with hash \"$2\""
local -r file="$1"
local -r hash="$2"
local -r urls=( $(split-commas "$3") )
Expand All @@ -79,10 +80,10 @@ download-or-bust() {
while true; do
for url in "${urls[@]}"; do
commands=(
"curl -f --compressed -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10"
"wget --compression=auto -O "${file}" --connect-timeout=20 --tries=6 --wait=10"
"curl -f -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10"
"wget -O "${file}" --connect-timeout=20 --tries=6 --wait=10"
"curl -f --compressed -Lo \"${file}\" --connect-timeout 20 --retry 6 --retry-delay 10"
"wget --compression=auto -O \"${file}\" --connect-timeout=20 --tries=6 --wait=10"
"curl -f -Lo \"${file}\" --connect-timeout 20 --retry 6 --retry-delay 10"
"wget -O \"${file}\" --connect-timeout=20 --tries=6 --wait=10"
)
for cmd in "${commands[@]}"; do
echo "Attempting download with: ${cmd} {url}"
Expand Down Expand Up @@ -110,15 +111,15 @@ validate-hash() {
local -r expected="$2"
local actual

actual=$(sha256sum ${file} | awk '{ print $1 }') || true
actual=$(sha256sum "${file}" | awk '{ print $1 }') || true
if [[ "${actual}" != "${expected}" ]]; then
echo "== ${file} corrupted, hash ${actual} doesn't match expected ${expected} =="
return 1
fi
}

function split-commas() {
echo $1 | tr "," "\n"
echo "$1" | tr "," "\n"
}

function download-release() {
Expand Down
1 change: 1 addition & 0 deletions upup/pkg/fi/cloudup/awstasks/launchtemplate_target_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func (t *LaunchTemplate) RenderAWS(c *awsup.AWSAPITarget, a, e, changes *LaunchT
if err != nil {
return fmt.Errorf("error rendering LaunchTemplate UserData: %v", err)
}
klog.Infof("== USERDATA ==:\n%s", string(d))
data.UserData = aws.String(base64.StdEncoding.EncodeToString(d))
}
// @step: add market options
Expand Down
Loading