diff --git a/test/cases/installers.sh b/test/cases/installers.sh index ee0eeca85..a913f2dc3 100755 --- a/test/cases/installers.sh +++ b/test/cases/installers.sh @@ -154,10 +154,13 @@ SSH_DATA_DIR=$(/usr/libexec/osbuild-composer-test/gen-ssh.sh) SSH_KEY=${SSH_DATA_DIR}/id_rsa SSH_KEY_PUB=$(cat "${SSH_KEY}".pub) +ARTIFACTS="ci-artifacts" +mkdir -p "${ARTIFACTS}" # Get the compose log. get_compose_log () { COMPOSE_ID=$1 - LOG_FILE=${WORKSPACE}/osbuild-${ID}-${VERSION_ID}-${COMPOSE_ID}.log + greenprint "Saving compose log for ${COMPOSE_ID} to artifacts" + LOG_FILE=${ARTIFACTS}/osbuild-${ID}-${VERSION_ID}-${COMPOSE_ID}.log # Download the logs. sudo composer-cli compose log "$COMPOSE_ID" | tee "$LOG_FILE" > /dev/null @@ -166,7 +169,8 @@ get_compose_log () { # Get the compose metadata. get_compose_metadata () { COMPOSE_ID=$1 - METADATA_FILE=${WORKSPACE}/osbuild-${ID}-${VERSION_ID}-${COMPOSE_ID}.json + METADATA_FILE=${ARTIFACTS}/osbuild-${ID}-${VERSION_ID}-${COMPOSE_ID}.json + greenprint "Saving manifest for ${COMPOSE_ID}" # Download the metadata. sudo composer-cli compose metadata "$COMPOSE_ID" > /dev/null @@ -177,7 +181,7 @@ get_compose_metadata () { sudo rm -f "$TARBALL" # Move the JSON file into place. - sudo jq -M '.' "${TEMPDIR}"/"${COMPOSE_ID}".json | tee "$METADATA_FILE" > /dev/null + sudo cat "${TEMPDIR}"/"${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null } # Build an installer