test: new weldr client compatibility for test scripts
- Handle the array responses from the new weldr-client (>= 35.6). - Move the `get_build_info` function to shared_libs.sh to source and reuse in multiple places.
This commit is contained in:
parent
8e24f5720d
commit
3b14828669
25 changed files with 57 additions and 247 deletions
|
|
@ -11,6 +11,8 @@ shopt -s expand_aliases
|
|||
set -euo pipefail
|
||||
|
||||
source /usr/libexec/osbuild-composer-test/set-env-variables.sh
|
||||
source /usr/libexec/tests/osbuild-composer/shared_lib.sh
|
||||
|
||||
BRANCH_NAME="${CI_COMMIT_BRANCH:-local}"
|
||||
BUILD_ID="${CI_BUILD_ID:-$(uuidgen)}"
|
||||
HYPER_V_GEN="${HYPER_V_GEN:-V1}"
|
||||
|
|
@ -20,15 +22,6 @@ function greenprint {
|
|||
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
|
||||
}
|
||||
|
||||
function get_build_info() {
|
||||
key="$1"
|
||||
fname="$2"
|
||||
if rpm -q --quiet weldr-client; then
|
||||
key=".body${key}"
|
||||
fi
|
||||
jq -r "${key}" "${fname}"
|
||||
}
|
||||
|
||||
# Container image used for cloud provider CLI tools
|
||||
CONTAINER_IMAGE_CLOUD_TOOLS="quay.io/osbuild/cloud-tools:latest"
|
||||
|
||||
|
|
@ -138,14 +131,6 @@ get_compose_metadata () {
|
|||
sudo cat "${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
}
|
||||
|
||||
is_weldr_client_installed () {
|
||||
if rpm --quiet -q weldr-client; then
|
||||
echo true
|
||||
else
|
||||
echo false
|
||||
fi
|
||||
}
|
||||
|
||||
# Export Azure credentials if running on Jenkins
|
||||
set +u
|
||||
if [ -n "$AZURE_CREDS" ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue