diff --git a/.github/workflows/release-prod.yaml b/.github/workflows/release-prod.yaml index a48e81aec..c9ef39c2f 100644 --- a/.github/workflows/release-prod.yaml +++ b/.github/workflows/release-prod.yaml @@ -175,7 +175,7 @@ jobs: run: | export EC_VERSION="${{ needs.get-tag.outputs.tag-name }}" export OPERATOR_IMAGE=proxy.replicated.com/anonymous/${{ needs.publish-operator-image.outputs.image }} - export OPERATOR_VERSION=${{ needs.get-tag.outputs.tag-name }} + export OPERATOR_VERSION=$(echo "${{ needs.get-tag.outputs.tag-name }}" | sed 's/^v//') ./scripts/cache-files.sh @@ -188,7 +188,7 @@ jobs: run: | export EC_VERSION="${{ needs.get-tag.outputs.tag-name }}" export OPERATOR_IMAGE=proxy.replicated.com/anonymous/${{ needs.publish-operator-image.outputs.image }} - export OPERATOR_VERSION=${{ needs.get-tag.outputs.tag-name }} + export OPERATOR_VERSION=$(echo "${{ needs.get-tag.outputs.tag-name }}" | sed 's/^v//') ./scripts/cache-files.sh diff --git a/e2e/scripts/vandoor-prepare.sh b/e2e/scripts/vandoor-prepare.sh index c41c48077..755642236 100755 --- a/e2e/scripts/vandoor-prepare.sh +++ b/e2e/scripts/vandoor-prepare.sh @@ -11,7 +11,7 @@ main() { apt-get install curl ca-certificates -y echo "downloading from https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci/${app_version_label}" - curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci/${app_version_label}" -H "Authorization: ${license_id}" -o ec-release.tgz + curl -fL -o ec-release.tgz "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci/${app_version_label}" -H "Authorization: ${license_id}" tar xzf ec-release.tgz mkdir -p /assets diff --git a/scripts/cache-files.sh b/scripts/cache-files.sh index 651165424..c3b539096 100755 --- a/scripts/cache-files.sh +++ b/scripts/cache-files.sh @@ -137,10 +137,16 @@ function embeddedcluster() { return 0 fi + # append a 'v' prefix to the version if it doesn't already have one + local version="$EC_VERSION" + if ! echo "$version" | grep -q "^v"; then + version="v$version" + fi + # check if a file 'embedded-cluster-linux-amd64.tgz' exists in the directory - # if it does, upload it as releases/${EC_VERSION}.tgz + # if it does, upload it as releases/${version}.tgz if [ -f embedded-cluster-linux-amd64.tgz ]; then - retry 3 aws s3 cp --no-progress embedded-cluster-linux-amd64.tgz "s3://${S3_BUCKET}/releases/${EC_VERSION}.tgz" + retry 3 aws s3 cp --no-progress embedded-cluster-linux-amd64.tgz "s3://${S3_BUCKET}/releases/${version}.tgz" else echo "embedded-cluster-linux-amd64.tgz not found, skipping upload" fi diff --git a/scripts/create-previous-k0s-release.sh b/scripts/create-previous-k0s-release.sh index e8b04bc94..504bede64 100755 --- a/scripts/create-previous-k0s-release.sh +++ b/scripts/create-previous-k0s-release.sh @@ -66,10 +66,16 @@ function embeddedcluster() { return 0 fi + # append a 'v' prefix to the version if it doesn't already have one + local version="$EC_VERSION" + if ! echo "$version" | grep -q "^v"; then + version="v$version" + fi + # check if a file 'embedded-cluster-linux-amd64-previous-k0s.tgz' exists in the directory - # if it does, upload it as releases/${EC_VERSION}.tgz + # if it does, upload it as releases/${version}.tgz if [ -f embedded-cluster-linux-amd64-previous-k0s.tgz ]; then - retry 3 aws s3 cp --no-progress embedded-cluster-linux-amd64-previous-k0s.tgz "s3://${S3_BUCKET}/releases/${EC_VERSION}.tgz" + retry 3 aws s3 cp --no-progress embedded-cluster-linux-amd64-previous-k0s.tgz "s3://${S3_BUCKET}/releases/${version}.tgz" else echo "embedded-cluster-linux-amd64-previous-k0s.tgz not found, skipping upload" fi diff --git a/scripts/create-upgrade-release.sh b/scripts/create-upgrade-release.sh index 1f05a8fd6..f00ae1da6 100755 --- a/scripts/create-upgrade-release.sh +++ b/scripts/create-upgrade-release.sh @@ -66,10 +66,16 @@ function embeddedcluster() { return 0 fi + # append a 'v' prefix to the version if it doesn't already have one + local version="$EC_VERSION" + if ! echo "$version" | grep -q "^v"; then + version="v$version" + fi + # check if a file 'embedded-cluster-linux-amd64.tgz' exists in the directory - # if it does, upload it as releases/${EC_VERSION}.tgz + # if it does, upload it as releases/${version}.tgz if [ -f embedded-cluster-linux-amd64.tgz ]; then - retry 3 aws s3 cp --no-progress embedded-cluster-linux-amd64.tgz "s3://${S3_BUCKET}/releases/${EC_VERSION}.tgz" + retry 3 aws s3 cp --no-progress embedded-cluster-linux-amd64.tgz "s3://${S3_BUCKET}/releases/${version}.tgz" else echo "embedded-cluster-linux-amd64.tgz not found, skipping upload" fi