Skip to content

Conversation

@zmiklank
Copy link
Member

This should be similar to https://github.com/openshift-service-mesh/proxy/blob/release-1.27/ossm/ci/post-submit.sh and should have the same purpose.

I have not done any steps to create gs://maistra-prow-testing/ztunnel yet.

fi

tar czf ./out/rust/release/ztunnel.tar.gz ./out/rust/release/ztunnel
gsutil cp bazel-bin/envoy_tar.tar.gz "${ARTIFACTS_GCS_PATH}/ztunnel-alpha-${SHA}${ARCH_SUFFIX}.tar.gz"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. we should copy ztunnel, not envoy binary
  2. are you sure we need to rename it to ztunnel-alpha? I'd check at https://github.com/istio/istio/blob/master/bin/build_ztunnel.sh#L127-L133

Take a look at those Istio scripts to see if it's really necessary to upload a binary artifact, or if Istio is capable of building ztunnel from source. Proxy is done that way because building proxy is really an expensive task.

Copy link
Member Author

@zmiklank zmiklank Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should copy ztunnel, not envoy binary

oh, good catch!

Take a look at those Istio scripts to see if it's really necessary to upload a binary artifact, or if Istio is capable of building ztunnel from source. Proxy is done that way because building proxy is really an expensive task.

Good point, will do that.
Thanks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jwendell. Sorry it took me that long. From what I understood from istio repo, ztunnel is, similarly to proxy, pre-built and then pushed to gcloud. So I think the approach I proposed is correct.

@jwendell
Copy link

jwendell commented Dec 3, 2025

I have not done any steps to create gs://maistra-prow-testing/ztunnel yet.

No need to perform any prior creation. If a directory doesn't exist, it's created on demand.

Signed-off-by: Zuzana Miklankova <[email protected]>
fi

tar czf ./out/rust/release/ztunnel.tar.gz ./out/rust/release/ztunnel
gsutil cp ./out/rust/release/ztunnel.tar.gz "${ARTIFACTS_GCS_PATH}/ztunnel-${SHA}${ARCH_SUFFIX}.tar.gz"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need to tar.gz it, AFAICT upstream uses the raw binary:

https://github.com/istio/ztunnel/blob/master/scripts/release.sh#L51
and
https://github.com/istio/istio/blob/master/bin/build_ztunnel.sh#L129

plus, I think we need to add the arch to the filename: https://github.com/istio/ztunnel/blob/master/scripts/release.sh#L44

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed now, thanks.

SHA="$(git rev-parse --verify HEAD)"

if [[ "$(uname -m)" == "aarch64" ]]; then
ARCH_SUFFIX="-arm64"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the -

if [[ "$(uname -m)" == "aarch64" ]]; then
ARCH_SUFFIX="-arm64"
else
ARCH_SUFFIX=""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Zuzana Miklankova <[email protected]>
*) echo "unsupported architecture"; exit 1;;
esac

gsutil cp ./out/rust/release/ztunnel "${ARTIFACTS_GCS_PATH}/ztunnel-${SHA}-${ARCH}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @zmiklank - I just noticed - We're not performing the build anywhere in this script, thus the file ./out/rust/release/ztunnel doesn't exist at this point.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way it works is: After a PR is merged in ztunnel repository, a fresh new postsubmit job is triggered (copy-artifacts-gcs job in that file, which basically invokes this script (line 111 on that file). Thus, this script should perform a build and the upload the binary artifact.

See the proxy cousin: https://github.com/openshift-service-mesh/proxy/blob/release-1.28/ossm/ci/post-submit.sh#L17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants