diff --git a/testing/cloud_layouts/script.sh b/testing/cloud_layouts/script.sh index a4d4321fd..edb6bc2d6 100755 --- a/testing/cloud_layouts/script.sh +++ b/testing/cloud_layouts/script.sh @@ -456,18 +456,29 @@ function test_requirements() { >&2 echo "Run script ... " testScript=$(cat <&2 echo "Download yq..." -chmod +x /usr/bin/yq +d8-curl -sLfo /opt/deckhouse/bin/yq https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_amd64 -command -v yq >/dev/null 2>&1 || exit 1 +>&2 echo "chmod yq..." + +chmod +x /opt/deckhouse/bin/yq + +>&2 echo "Create release file ..." echo "$release" > /tmp/releaseFile.yaml +>&2 echo "Release file ..." + +cat /tmp/releaseFile.yaml + +>&2 echo "Apply module config ..." + echo 'apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: @@ -478,6 +489,8 @@ spec: update: mode: Auto' | kubectl apply -f - +>&2 echo "Apply deckhousereleases ..." + echo 'apiVersion: deckhouse.io/v1alpha1 approved: false kind: DeckhouseRelease @@ -487,11 +500,15 @@ metadata: name: v1.96.3 spec: version: v1.96.3 - requirements: -' | yq '. | load("/tmp/releaseFile.yaml") as \$d1 | .spec.requirements=\$d1.requirements' | kubectl apply -f - + requirements: {} +' | /opt/deckhouse/bin/yq '. | load("/tmp/releaseFile.yaml") as \$d1 | .spec.requirements=\$d1.requirements' | kubectl apply -f - + +>&2 echo "Remove release file ..." rm /tmp/releaseFile.yaml +>&2 echo "Sleep 5 seconds before check..." + sleep 5 >&2 echo "Release status: \$(kubectl get deckhousereleases.deckhouse.io -o 'jsonpath={..status.phase}')"