Our base test image installs the correct version of Go (detected in the
authorWard Vandewege <ward@curii.com>
Wed, 13 Apr 2022 16:53:25 +0000 (12:53 -0400)
committerWard Vandewege <ward@curii.com>
Wed, 13 Apr 2022 16:53:25 +0000 (12:53 -0400)
usual way from the Arvados source tree).

Check out the git tree using the git protocol, not http.

No issue #

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>

jenkins/packer-images/jenkins-image-arvados-tests.sh
jenkins/packer-images/jenkins-image-common.sh

index 4c29498f8562927a4c83fc59e45eec42b8305445..c2a9a8f8fe7ae9b60569793f01ca9e136df40444 100755 (executable)
@@ -9,18 +9,21 @@ set -eo pipefail
 # Install the dependencies for arvados-server
 sudo su -c "DEBIAN_FRONTEND=noninteractive apt-get install -y libpam0g-dev wget build-essential"
 
-# Get Go 1.16.3
-cd /usr/src
-sudo wget https://golang.org/dl/go1.16.3.linux-amd64.tar.gz
-sudo tar xzf go1.16.3.linux-amd64.tar.gz
-sudo ln -s /usr/src/go/bin/go /usr/local/bin/go-1.16.3
-sudo ln -s /usr/src/go/bin/gofmt /usr/local/bin/gofmt-1.16.3
-sudo ln -s /usr/local/bin/go-1.16.3 /usr/local/bin/go
-sudo ln -s /usr/local/bin/gofmt-1.16.3 /usr/local/bin/gofmt
-
 # Check out a local copy of the arvados repo so we can use it to install the dependencies
 cd /usr/src
 sudo git clone arvados.git
+
+# Install the correct version of Go
+GO_VERSION=`grep 'const goversion =' /usr/src/arvados/lib/install/deps.go |awk -F'"' '{print $2}'`
+cd /usr/src
+sudo wget https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz
+sudo tar xzf go${GO_VERSION}.linux-amd64.tar.gz
+sudo ln -s /usr/src/go/bin/go /usr/local/bin/go-${GO_VERSION}
+sudo ln -s /usr/src/go/bin/gofmt /usr/local/bin/gofmt-${GO_VERSION}
+sudo ln -s /usr/local/bin/go-${GO_VERSION} /usr/local/bin/go
+sudo ln -s /usr/local/bin/gofmt-${GO_VERSION} /usr/local/bin/gofmt
+
+# Preseed our dependencies
 cd arvados
 sudo go mod download
 sudo go run ./cmd/arvados-server install -type test
index 6f83c38cbbb735e67b653e9dffc5a4b5fc9a1f30..e68b092c0779fd178f3c757787f52ab09cc8f28e 100755 (executable)
@@ -42,7 +42,7 @@ sudo su -c "${POSTINSTALL_CMD}"
 # create a reference repository (bare git repo)
 # jenkins will use this to speed up the checkout for each job
 cd /usr/src
-sudo git clone --mirror https://git.arvados.org/arvados.git
+sudo git clone --mirror git://git.arvados.org/arvados.git
 sudo chown jenkins:jenkins arvados.git -R
 
 # Jenkins will use this script to determine when the node is ready for use