From e629e0165de388ab2fb44cc8032f42487d98105d Mon Sep 17 00:00:00 2001 From: Souhaila Noor Date: Mon, 8 Nov 2021 08:42:49 -0600 Subject: [PATCH] install correct version of go --- .gitlab/.gitlab-ci.yml | 6 +++--- .gitlab/cloud-init.sh | 22 ++++++++++------------ 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index bfb881491..a3599bbe7 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -109,7 +109,7 @@ upload to sonarcloud: - job: run jest tests build for linux amd64: - stage: build + stage: lint image: registry.gitlab.com/molecula/featurebase/builder:0.0.3 extends: .go-cache variables: @@ -177,7 +177,7 @@ build container fb: - echo Created docker featurebase image with tag "$tag" deploy node for linux amd64: - stage: integration + stage: lint image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest variables: AMI: "" @@ -222,7 +222,7 @@ deploy node for linux amd64: - linux-amd64-instance.txt terminate node for linux amd64: - stage: integration + stage: lint image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest variables: INSTANCE_ID: "" diff --git a/.gitlab/cloud-init.sh b/.gitlab/cloud-init.sh index e192938ba..18257a90b 100755 --- a/.gitlab/cloud-init.sh +++ b/.gitlab/cloud-init.sh @@ -4,21 +4,19 @@ exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1 # Install packages yum update -y -yum install golang -y # latest verion in ec2 is 1.15.14 +# yum install golang -y # latest verion in ec2 is 1.15.14 yum install postgresql -y # Configure host system -cat /proc/sys/fs/file-max +echo 'cat /proc/sys/fs/file-max' sysctl -w fs.file-max=262144 sysctl -p -cat /proc/sys/fs/file-max +echo 'cat /proc/sys/fs/file-max' -# # install go 1.16.9 -# curl -O https://dl.google.com/go/go1.16.9.linux-amd64.tar.gz -# tar xvf go1.16.9.linux-amd64.tar.gz -# chown -R root:root ./go -# mv go /usr/local -# echo 'export GOPATH=$HOME/work' >> ~/.profile -# echo 'export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin' >> ~/.profile -# chown ec2-user ~/.profile -# source ~/.profile +# install go 1.16.9 +curl -O https://dl.google.com/go/go1.16.9.linux-amd64.tar.gz +tar xvf go1.16.9.linux-amd64.tar.gz +chown -R root:root ./go +mv go /usr/local +echo "export PATH=$PATH:/usr/local/go/bin" | sudo tee -a /etc/profile > /dev/null +source /etc/profile