From d728d2c1c5a188e9cd3bdd187831879fd672dc6c Mon Sep 17 00:00:00 2001 From: Andrew Pantuso Date: Wed, 28 Sep 2022 08:05:05 -0400 Subject: [PATCH] ci: refactor jenkins env setup --- build_tag.sh | 2 ++ cicd/jenkins_env.sh | 9 +++++++++ pr_check.sh | 6 +----- 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100755 cicd/jenkins_env.sh diff --git a/build_tag.sh b/build_tag.sh index 48693fd3..7c54845b 100755 --- a/build_tag.sh +++ b/build_tag.sh @@ -2,4 +2,6 @@ set -exvo pipefail -o nounset +source "${PWD}/cicd/jenkins_env.sh" + ./mage release:cli diff --git a/cicd/jenkins_env.sh b/cicd/jenkins_env.sh new file mode 100755 index 00000000..550cb65a --- /dev/null +++ b/cicd/jenkins_env.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -exvo pipefail -o nounset + +GO_1_18="/opt/go/1.18.1/bin" + +if [ -d "${GO_1_18}" ]; then + PATH="${GO_1_18}:${PATH}" +fi diff --git a/pr_check.sh b/pr_check.sh index 51496f6e..5164a480 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -2,11 +2,7 @@ set -exvo pipefail -o nounset -GO_1_18="/opt/go/1.18.1/bin" - -if [ -d "${GO_1_18}" ]; then - PATH="${GO_1_18}:${PATH}" -fi +source "${PWD}/cicd/jenkins_env.sh" # pre-emptively install go-sqlite3 to ensure amalgamated libsqlite3 # source is present for compilation.