@@ -72,7 +72,7 @@ function operatorbin() {
7272
7373 # check if the binary already exists in the bucket
7474 local operator_binary_exists=
75- operator_binary_exists=$( aws s3api head-object --bucket " ${S3_BUCKET} " --key " operator-binaries/${operator_version} " || true)
75+ operator_binary_exists=$( aws s3api head-object --bucket " ${S3_BUCKET} " --key " operator-binaries/${operator_version} .tar.gz " || true)
7676
7777 # if the binary already exists, we don't need to upload it again
7878 if [ -n " ${operator_binary_exists} " ]; then
@@ -84,8 +84,13 @@ function operatorbin() {
8484 echo " downloading embedded cluster operator binary from https://github.com/replicatedhq/embedded-cluster-operator/releases/download/v${operator_version} /manager"
8585 curl --fail-with-body -L -o " ${operator_version} " " https://github.com/replicatedhq/embedded-cluster-operator/releases/download/v${operator_version} /manager"
8686
87+ chmod +x " ${operator_version} "
88+
89+ # compress the operator binary
90+ tar -czf " ${operator_version} .tar.gz" " ${operator_version} "
91+
8792 # upload the binary to the bucket
88- retry 3 aws s3 cp " ${operator_version} " " s3://${S3_BUCKET} /operator-binaries/${operator_version} "
93+ retry 3 aws s3 cp " ${operator_version} .tar.gz " " s3://${S3_BUCKET} /operator-binaries/${operator_version} .tar.gz "
8994}
9095
9196function kotsbin() {
@@ -100,7 +105,7 @@ function kotsbin() {
100105
101106 # check if the binary already exists in the bucket
102107 local kots_binary_exists=
103- kots_binary_exists=$( aws s3api head-object --bucket " ${S3_BUCKET} " --key " kots-binaries/${kots_version} " || true)
108+ kots_binary_exists=$( aws s3api head-object --bucket " ${S3_BUCKET} " --key " kots-binaries/${kots_version} .tar.gz " || true)
104109
105110 # if the binary already exists, we don't need to upload it again
106111 if [ -n " ${kots_binary_exists} " ]; then
@@ -117,11 +122,8 @@ function kotsbin() {
117122 curl --fail-with-body -L -o " kots_linux_amd64.tar.gz" " https://github.com/replicatedhq/kots/releases/download/${kots_version} /kots_linux_amd64.tar.gz"
118123 fi
119124
120- # decompress the bundle, as we only care about the binary and not the sbom/license/readme
121- tar -xvf kots_linux_amd64.tar.gz
122-
123125 # upload the binary to the bucket
124- retry 3 aws s3 cp " kots " " s3://${S3_BUCKET} /kots-binaries/${kots_version} "
126+ retry 3 aws s3 cp " kots_linux_amd64.tar.gz " " s3://${S3_BUCKET} /kots-binaries/${kots_version} .tar.gz "
125127}
126128
127129function metadata() {
0 commit comments