You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sm...@apache.org on 2025/05/29 14:48:54 UTC
(cassandra-builds) 01/01: align Go installation to in-tree one
This is an automated email from the ASF dual-hosted git repository.
smiklosovic pushed a commit to branch CASSANDRA-20687
in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git
commit 24c59ee96ce1d1a088643011e68c9b40ffd89e50
Author: Stefan Miklosovic <sm...@apache.org>
AuthorDate: Thu May 29 16:44:54 2025 +0200
align Go installation to in-tree one
---
docker/testing/ubuntu2004_j11.docker | 39 ++++++++++++++++++------------------
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/docker/testing/ubuntu2004_j11.docker b/docker/testing/ubuntu2004_j11.docker
index fd06522..50207b4 100644
--- a/docker/testing/ubuntu2004_j11.docker
+++ b/docker/testing/ubuntu2004_j11.docker
@@ -104,6 +104,25 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
# fix up permissions on the cassandra home dir
RUN chown -R cassandra:cassandra /home/cassandra
+# install golang. GO_VERSION_SHA must be updated with VERSION
+RUN sh -c '\
+ GO_VERSION="1.24.3" ;\
+ GO_VERSION_SHAS="3333f6ea53afa971e9078895eaa4ac7204a8c6b5c68c10e6bc9a33e8e391bdd8 a463cb59382bd7ae7d8f4c68846e73c4d589f223c589ac76871b66811ded7836 13e6fe3fcf65689d77d40e633de1e31c6febbdbcb846eb05fc2434ed2213e92b 64a3fa22142f627e78fac3018ce3d4aeace68b743eff0afda8aae0411df5e4fb" ;\
+ GO_OS=linux ;\
+ [ $(uname) = "Darwin" ] && GO_OS=darwin ;\
+ GO_PLATFORM=amd64 ;\
+ [ $(uname -m) = "aarch64" ] && GO_PLATFORM=arm64 ;\
+ GO_TAR="go${GO_VERSION}.${GO_OS}-${GO_PLATFORM}.tar.gz" ;\
+ curl -L --fail --silent --retry 2 --retry-delay 5 --max-time 30 https://go.dev/dl/$GO_TAR -o $GO_TAR ;\
+ GO_SHA="$(sha256sum $GO_TAR | cut -d" " -f2)" ;\
+ echo "$GO_VERSION_SHAS" | sed "s/ /\n/g" | grep -q "$GO_SHA" || { echo "SHA256 mismatch for $GO_TAR $GO_SHA"; exit 1; } ;\
+ tar -C /usr/local -xzf $GO_TAR ;\
+ rm $GO_TAR'
+
+ENV GOROOT="/usr/local/go"
+ENV GOPATH="/home/cassandra/go"
+ENV PATH="$PATH:/usr/local/go/bin"
+
# switch to the cassandra user... we are all done running things as root
USER cassandra
ENV HOME /home/cassandra
@@ -161,26 +180,6 @@ RUN chown cassandra:cassandra ~/.ssh
RUN chown cassandra:cassandra ~/.ssh/config
RUN chmod 600 ~/.ssh/config
-ENV GO_VERSION="1.24.3"
-
-RUN sh -c '\
- GO_VERSION_SHAS="3333f6ea53afa971e9078895eaa4ac7204a8c6b5c68c10e6bc9a33e8e391bdd8 a463cb59382bd7ae7d8f4c68846e73c4d589f223c589ac76871b66811ded7836 13e6fe3fcf65689d77d40e633de1e31c6febbdbcb846eb05fc2434ed2213e92b 64a3fa22142f627e78fac3018ce3d4aeace68b743eff0afda8aae0411df5e4fb" ;\
- GO_OS=linux ;\
- [ $(uname) = "Darwin" ] && GO_OS=darwin ;\
- GO_PLATFORM=amd64 ;\
- [ $(uname -m) = "aarch64" ] && GO_PLATFORM=arm64 ;\
- GO_TAR="go${GO_VERSION}.${GO_OS}-${GO_PLATFORM}.tar.gz" ;\
- curl -L --fail --silent --retry 2 --retry-delay 5 --max-time 30 https://go.dev/dl/$GO_TAR -o $GO_TAR ;\
- GO_SHA="$(sha256sum $GO_TAR | cut -d" " -f2)" ;\
- echo "$GO_VERSION_SHAS" | sed "s/ /\n/g" | grep -q "$GO_SHA" || { echo "SHA256 mismatch for $GO_TAR $GO_SHA"; exit 1; } ;\
- mkdir -p $HOME/go-${GO_VERSION}; \
- tar -C $HOME/go-${GO_VERSION} -xzf $GO_TAR ;\
- rm $GO_TAR'
-
-ENV GOROOT="$HOME/go-${GO_VERSION}/go"
-ENV GOPATH="$HOME/go"
-ENV PATH="$PATH:$HOME/go-${GO_VERSION}/go/bin"
-
# mark "/tmp" as a volume so it will get mounted as an ext4 mount and not
# the stupid aufs/CoW stuff that the actual docker container mounts will have.
# we've been seeing 3+ minute hangs when calling sync on an aufs backed mount
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org