From 6cab04ae2dd0718ebf9774dc058687cb05afc5b1 Mon Sep 17 00:00:00 2001 From: smerle33 Date: Tue, 16 Jan 2024 12:25:47 +0100 Subject: [PATCH] correct provisionning with binary only --- provisioning/ubuntu-provision.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/provisioning/ubuntu-provision.sh b/provisioning/ubuntu-provision.sh index 3acc05252..6165d3f63 100755 --- a/provisioning/ubuntu-provision.sh +++ b/provisioning/ubuntu-provision.sh @@ -200,19 +200,16 @@ function install_docker() { ## Ensure Golang is installed function install_golang(){ - local temp_archive="/tmp/go${GOLANG_VERSION}.tgz" - local installation_dir="/usr/local/" - local download_url="https://go.dev/dl/go${GOLANG_VERSION}.linux-${ARCHITECTURE}.tar.gz" - curl --fail --silent --show-error --location --output "${temp_archive}" "${download_url}" - tar --extract --gunzip --file="${temp_archive}" --directory="${installation_dir}" - # Symlink to a folder in the PATH - ln -s "${installation_dir}go/bin/go" /usr/local/bin/go + ## will be installed in /usr/local/bin + curl --fail --silent --show-error --location "https://go.dev/dl/go${GOLANG_VERSION}.linux-${ARCHITECTURE}.tar.gz" | \ + tar --extract --gunzip --strip-components=1 --directory="/usr/local/" go/bin/go } ## Ensure GolangCIlint is installed function install_golangcilint(){ - # binary will be in /usr/local/bin - curl -sSfL "https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh" | sh -s -- -b /usr/local/bin "v${GOLANGCILINT_VERSION}" + ## will be installed in /usr/local/bin + curl --fail --silent --show-error --location "https://www.github.com/golangci/golangci-lint/releases/download/v${GOLANGCILINT_VERSION}/golangci-lint-${GOLANGCILINT_VERSION}-linux-${ARCHITECTURE}.tar.gz" | \ + tar --extract --gunzip --strip-components=1 --directory="/usr/local/bin/" golangci-lint-"${GOLANGCILINT_VERSION}"-linux-arm64/golangci-lint } ## Ensure that the Jenkins Agent commons requirements are installed