cloudapi/v2: Listen on /api/image-builder-composer/v2
This commit is contained in:
parent
01d920ac01
commit
6ce20a9ef6
7 changed files with 80 additions and 75 deletions
|
|
@ -668,6 +668,11 @@ function sendCompose() {
|
|||
function waitForState() {
|
||||
local DESIRED_STATE="${1:-success}"
|
||||
local VERSION="${2:-v1}"
|
||||
local URL=https://localhost/api/composer/v1/compose/"$COMPOSE_ID"
|
||||
if [ "$VERSION" = "v2" ]; then
|
||||
URL=https://localhost/api/image-builder-composer/v2/compose/"$COMPOSE_ID"
|
||||
fi
|
||||
|
||||
while true
|
||||
do
|
||||
OUTPUT=$(curl \
|
||||
|
|
@ -676,7 +681,7 @@ function waitForState() {
|
|||
--cacert /etc/osbuild-composer/ca-crt.pem \
|
||||
--key /etc/osbuild-composer/client-key.pem \
|
||||
--cert /etc/osbuild-composer/client-crt.pem \
|
||||
https://localhost/api/composer/"$VERSION"/compose/"$COMPOSE_ID")
|
||||
"$URL")
|
||||
|
||||
COMPOSE_STATUS=$(echo "$OUTPUT" | jq -r '.image_status.status')
|
||||
UPLOAD_STATUS=$(echo "$OUTPUT" | jq -r '.image_status.upload_status.status')
|
||||
|
|
@ -969,7 +974,7 @@ function verifyInAWSS3() {
|
|||
--cacert /etc/osbuild-composer/ca-crt.pem \
|
||||
--key /etc/osbuild-composer/client-key.pem \
|
||||
--cert /etc/osbuild-composer/client-crt.pem \
|
||||
https://localhost/api/composer/v2/compose/"$COMPOSE_ID"/metadata | jq -r '.ostree_commit')
|
||||
https://localhost/api/image-builder-composer/v2/compose/"$COMPOSE_ID"/metadata | jq -r '.ostree_commit')
|
||||
|
||||
if [[ "${API_COMMIT_ID_V2}" != "${TAR_COMMIT_ID}" ]]; then
|
||||
echo "Commit ID returned from API v2 does not match Commit ID in archive 😠"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue