Skip to content

Commit

Permalink
ci: refactor script of releasing charts to S3 (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
zyy17 authored Oct 19, 2023
1 parent b7a0e01 commit 7610d07
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/scripts/release-charts-to-s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,20 @@ function release_charts_to_s3() {

aws s3 cp "$chart"/"$package" s3://"$GREPTIME_RELEASE_BUCKET"/"$RELEASE_DIR"/"$chart"/"$version"/"$package"

# Create a latest directory will be more helpful when we want to download the latest version of a chart.
aws s3 cp "$chart"/"$package" s3://"$GREPTIME_RELEASE_BUCKET"/"$RELEASE_DIR"/"$chart"/latest/"$chart"-latest.tgz
echo "$version" > latest-version.txt

# Create a latest-version.txt file in the chart directory.
aws s3 cp latest-version.txt s3://"$GREPTIME_RELEASE_BUCKET"/"$RELEASE_DIR"/"$chart"/latest-version.txt
}

function main() {
update_greptime_charts
release_charts_to_s3 greptime greptimedb-operator
release_charts_to_s3 greptime greptimedb-standalone
release_charts_to_s3 greptime greptimedb-cluster
release_charts_to_s3 greptime greptimedb
release_charts_to_s3 oci://registry-1.docker.io/bitnamicharts etcd
}

update_greptime_charts
release_charts_to_s3 greptime greptimedb-operator
release_charts_to_s3 greptime greptimedb
release_charts_to_s3 oci://registry-1.docker.io/bitnamicharts etcd
# The entrypoint for the script.
main

0 comments on commit 7610d07

Please sign in to comment.