From 95ef0b73226aa7bc40f44fef5e7fa828b8b0c1c9 Mon Sep 17 00:00:00 2001 From: Thilo Fromm Date: Thu, 17 Feb 2022 12:12:08 +0100 Subject: [PATCH] ci-automation: git author and curl verboseness - Git author configuration moves to tagging function and put under a condition so as to not pollute peoples' workspaces. - curl now less verbose since it was spamming logs with TLS debug information. Signed-off-by: Thilo Fromm --- ci-automation/ci_automation_common.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/ci-automation/ci_automation_common.sh b/ci-automation/ci_automation_common.sh index 871f8cfbfe..e98a44ca45 100644 --- a/ci-automation/ci_automation_common.sh +++ b/ci-automation/ci_automation_common.sh @@ -9,14 +9,6 @@ source ci-automation/ci-config.env : ${PIGZ:=pigz} -# set up author and email so git does not complain when tagging -if ! git config --get user.name ; then - git -C . config user.name "${CI_GIT_AUTHOR}" -fi -if ! git config --get user.email ; then - git -C . config user.email "${CI_GIT_EMAIL}" -fi - function init_submodules() { git submodule init git submodule update @@ -31,7 +23,6 @@ function update_submodule() { git fetch --all --tags git checkout "${commit_ish}" cd - - } # -- @@ -58,6 +49,14 @@ function update_submodules() { function update_and_push_version() { local version="$1" + # set up author and email so git does not complain when tagging + if ! git config --get user.name >/dev/null 2>&1 ; then + git -C . config user.name "${CI_GIT_AUTHOR}" + fi + if ! git config --get user.email >/dev/null 2>&1 ; then + git -C . config user.email "${CI_GIT_EMAIL}" + fi + # Add and commit local changes git add "sdk_container/src/third_party/coreos-overlay" git add "sdk_container/src/third_party/portage-stable" @@ -102,7 +101,7 @@ function copy_from_buildcache() { local where_to="$2" mkdir -p "$where_to" - curl --verbose --fail --silent --show-error --location --retry-delay 1 --retry 60 \ + curl --fail --silent --show-error --location --retry-delay 1 --retry 60 \ --retry-connrefused --retry-max-time 60 --connect-timeout 20 \ --remote-name --output-dir "${where_to}" "https://${BUILDCACHE_SERVER}/${what}" } @@ -194,7 +193,7 @@ function docker_image_from_buildcache() { local url="https://${BUILDCACHE_SERVER}/containers/${version}/${tgz}" - curl --verbose --fail --silent --show-error --location --retry-delay 1 --retry 60 \ + curl --fail --silent --show-error --location --retry-delay 1 --retry 60 \ --retry-connrefused --retry-max-time 60 --connect-timeout 20 \ --remote-name "${url}"