Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh committed Aug 29, 2024
1 parent 7380f17 commit c5c0252
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion e2e/scripts/vandoor-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions scripts/cache-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions scripts/create-previous-k0s-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions scripts/create-upgrade-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c5c0252

Please sign in to comment.