Skip to content
Snippets Groups Projects
Commit da8a20f2 authored by Simon McVittie's avatar Simon McVittie
Browse files

tests: Use more default settings


The download URL defaults to the public download URL and the version of
pressure-vessel defaults to the latest standalone release, so we don't
usually need to specify those two explicitly.

In the case of PRESSURE_VESSEL_DOWNLOAD_URL, if it has been explicitly
set, we still want to pass it in: the official CI does this to bypass
the CDN that implements repo.steampowered.com and go directly to the
origin server.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent a246f537
Branches
Tags
1 merge request!62tests: Use more default settings
Pipeline #15135 passed with warnings
...@@ -19,10 +19,6 @@ if [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then ...@@ -19,10 +19,6 @@ if [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then
) )
fi fi
if [ -z "${PRESSURE_VESSEL_DOWNLOAD_URL-}" ]; then
PRESSURE_VESSEL_DOWNLOAD_URL=https://repo.steampowered.com/pressure-vessel/snapshots/
fi
if [ -n "${IMAGES_DOWNLOAD_URL-}" ] && [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then if [ -n "${IMAGES_DOWNLOAD_URL-}" ] && [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then
populate_depot_args=( \ populate_depot_args=( \
"${populate_depot_args[@]}" \ "${populate_depot_args[@]}" \
...@@ -41,21 +37,18 @@ else ...@@ -41,21 +37,18 @@ else
) )
fi fi
if [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then pressure_vessel_args=()
pressure_vessel_args=( \
--pressure-vessel-uri="${PRESSURE_VESSEL_DOWNLOAD_URL}" \ if [ -n "${PRESSURE_VESSEL_SSH_HOST-"${IMAGES_SSH_HOST-}"}" ] && [ -n "${PRESSURE_VESSEL_SSH_PATH-}" ]; then
--pressure-vessel-version=latest \
)
elif [ -n "${PRESSURE_VESSEL_SSH_HOST-"${IMAGES_SSH_HOST-}"}" ] && [ -n "${PRESSURE_VESSEL_SSH_PATH-}" ]; then
pressure_vessel_args=( \ pressure_vessel_args=( \
"${pressure_vessel_args[@]}" \
--pressure-vessel-ssh-host="${PRESSURE_VESSEL_SSH_HOST-"${IMAGES_SSH_HOST}"}" \ --pressure-vessel-ssh-host="${PRESSURE_VESSEL_SSH_HOST-"${IMAGES_SSH_HOST}"}" \
--pressure-vessel-ssh-path="${PRESSURE_VESSEL_SSH_PATH}" \ --pressure-vessel-ssh-path="${PRESSURE_VESSEL_SSH_PATH}" \
--pressure-vessel-version=latest \
) )
else elif [ -n "${PRESSURE_VESSEL_DOWNLOAD_URL-}" ]; then
pressure_vessel_args=( \ pressure_vessel_args=( \
"${pressure_vessel_args[@]}" \
--pressure-vessel-uri="${PRESSURE_VESSEL_DOWNLOAD_URL}" \ --pressure-vessel-uri="${PRESSURE_VESSEL_DOWNLOAD_URL}" \
--pressure-vessel-version=latest \
) )
fi fi
......
...@@ -19,10 +19,6 @@ if [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then ...@@ -19,10 +19,6 @@ if [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then
) )
fi fi
if [ -z "${PRESSURE_VESSEL_DOWNLOAD_URL-}" ]; then
PRESSURE_VESSEL_DOWNLOAD_URL=https://repo.steampowered.com/pressure-vessel/snapshots/
fi
if [ -n "${IMAGES_DOWNLOAD_URL-}" ] && [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then if [ -n "${IMAGES_DOWNLOAD_URL-}" ] && [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then
populate_depot_args=( \ populate_depot_args=( \
"${populate_depot_args[@]}" \ "${populate_depot_args[@]}" \
...@@ -47,21 +43,18 @@ else ...@@ -47,21 +43,18 @@ else
) )
fi fi
if [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then pressure_vessel_args=()
pressure_vessel_args=( \
--pressure-vessel-uri="${PRESSURE_VESSEL_DOWNLOAD_URL}" \ if [ -n "${PRESSURE_VESSEL_SSH_HOST-"${IMAGES_SSH_HOST-}"}" ] && [ -n "${PRESSURE_VESSEL_SSH_PATH-}" ]; then
--pressure-vessel-version=latest \
)
elif [ -n "${PRESSURE_VESSEL_SSH_HOST-"${IMAGES_SSH_HOST-}"}" ] && [ -n "${PRESSURE_VESSEL_SSH_PATH-}" ]; then
pressure_vessel_args=( \ pressure_vessel_args=( \
"${pressure_vessel_args[@]}" \
--pressure-vessel-ssh-host="${PRESSURE_VESSEL_SSH_HOST-"${IMAGES_SSH_HOST}"}" \ --pressure-vessel-ssh-host="${PRESSURE_VESSEL_SSH_HOST-"${IMAGES_SSH_HOST}"}" \
--pressure-vessel-ssh-path="${PRESSURE_VESSEL_SSH_PATH}" \ --pressure-vessel-ssh-path="${PRESSURE_VESSEL_SSH_PATH}" \
--pressure-vessel-version=latest \
) )
else elif [ -n "${PRESSURE_VESSEL_DOWNLOAD_URL-}" ]; then
pressure_vessel_args=( \ pressure_vessel_args=( \
"${pressure_vessel_args[@]}" \
--pressure-vessel-uri="${PRESSURE_VESSEL_DOWNLOAD_URL}" \ --pressure-vessel-uri="${PRESSURE_VESSEL_DOWNLOAD_URL}" \
--pressure-vessel-version=latest \
) )
fi fi
......
...@@ -19,10 +19,6 @@ if [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then ...@@ -19,10 +19,6 @@ if [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then
) )
fi fi
if [ -z "${PRESSURE_VESSEL_DOWNLOAD_URL-}" ]; then
PRESSURE_VESSEL_DOWNLOAD_URL=https://repo.steampowered.com/pressure-vessel/snapshots/
fi
if [ -n "${IMAGES_DOWNLOAD_URL-}" ] && [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then if [ -n "${IMAGES_DOWNLOAD_URL-}" ] && [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then
populate_depot_args=( \ populate_depot_args=( \
"${populate_depot_args[@]}" \ "${populate_depot_args[@]}" \
...@@ -41,21 +37,18 @@ else ...@@ -41,21 +37,18 @@ else
) )
fi fi
if [ -n "${IMAGES_DOWNLOAD_CREDENTIAL-}" ]; then pressure_vessel_args=()
pressure_vessel_args=( \
--pressure-vessel-uri="${PRESSURE_VESSEL_DOWNLOAD_URL}" \ if [ -n "${PRESSURE_VESSEL_SSH_HOST-"${IMAGES_SSH_HOST-}"}" ] && [ -n "${PRESSURE_VESSEL_SSH_PATH-}" ]; then
--pressure-vessel-version=latest \
)
elif [ -n "${PRESSURE_VESSEL_SSH_HOST-"${IMAGES_SSH_HOST-}"}" ] && [ -n "${PRESSURE_VESSEL_SSH_PATH-}" ]; then
pressure_vessel_args=( \ pressure_vessel_args=( \
"${pressure_vessel_args[@]}" \
--pressure-vessel-ssh-host="${PRESSURE_VESSEL_SSH_HOST-"${IMAGES_SSH_HOST}"}" \ --pressure-vessel-ssh-host="${PRESSURE_VESSEL_SSH_HOST-"${IMAGES_SSH_HOST}"}" \
--pressure-vessel-ssh-path="${PRESSURE_VESSEL_SSH_PATH}" \ --pressure-vessel-ssh-path="${PRESSURE_VESSEL_SSH_PATH}" \
--pressure-vessel-version=latest \
) )
else elif [ -n "${PRESSURE_VESSEL_DOWNLOAD_URL-}" ]; then
pressure_vessel_args=( \ pressure_vessel_args=( \
"${pressure_vessel_args[@]}" \
--pressure-vessel-uri="${PRESSURE_VESSEL_DOWNLOAD_URL}" \ --pressure-vessel-uri="${PRESSURE_VESSEL_DOWNLOAD_URL}" \
--pressure-vessel-version=latest \
) )
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment