From 75e26c58e134d450b19b983ab50b6926b13b120d Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Fri, 1 Oct 2021 13:32:52 -0400 Subject: Use $GIT_URL in scripts to avoid https CA cert failure. - git clone using https fails due to expired CA certificate, but project repo git clone works using git transfer protocol. Use $GIT_URL for clone command in scripts which use the git transfer protocol to the git mirror (same as git clone of project repo's) instead of https to the public gerrit ip address. Signed-off-by: Dave Wallace Change-Id: I15ef9e79e7e32d1561f6c452d192048f04c55caa --- jjb/scripts/csit/device-semiweekly.sh | 3 ++- jjb/scripts/csit/perf-timed.sh | 5 +++-- jjb/scripts/vpp/check_crc.sh | 5 +++-- jjb/scripts/vpp/csit-device.sh | 5 +++-- jjb/scripts/vpp/csit-perf.sh | 5 +++-- 5 files changed, 14 insertions(+), 9 deletions(-) mode change 100644 => 100755 jjb/scripts/csit/device-semiweekly.sh mode change 100644 => 100755 jjb/scripts/csit/perf-timed.sh mode change 100644 => 100755 jjb/scripts/vpp/check_crc.sh mode change 100644 => 100755 jjb/scripts/vpp/csit-device.sh mode change 100644 => 100755 jjb/scripts/vpp/csit-perf.sh (limited to 'jjb/scripts') diff --git a/jjb/scripts/csit/device-semiweekly.sh b/jjb/scripts/csit/device-semiweekly.sh old mode 100644 new mode 100755 index ea405b2b5..1086b5463 --- a/jjb/scripts/csit/device-semiweekly.sh +++ b/jjb/scripts/csit/device-semiweekly.sh @@ -21,13 +21,14 @@ set -exuo pipefail # # Variables read: # - WORKSPACE - Jenkins workspace to create csit subdirectory in. +# - GIT_URL - Git clone URL # - BRANCH_ID - CSIT operational branch to be used for test. # Directories updated: # - ${WORKSPACE}/csit - Created, holding a checked out CSIT repository. # - Multiple other side effects by entry script(s), see CSIT repository. cd "${WORKSPACE}" -git clone https://gerrit.fd.io/r/csit --depth=1 --no-single-branch --no-checkout +git clone "${GIT_URL}/csit" --depth=1 --no-single-branch --no-checkout # Check BRANCH_ID value. if [[ -z "${BRANCH_ID-}" ]]; then echo "BRANCH_ID not provided => 'oper' belonging to master will be used." diff --git a/jjb/scripts/csit/perf-timed.sh b/jjb/scripts/csit/perf-timed.sh old mode 100644 new mode 100755 index 6d31f9ef2..10925b04f --- a/jjb/scripts/csit/perf-timed.sh +++ b/jjb/scripts/csit/perf-timed.sh @@ -21,6 +21,7 @@ set -exuo pipefail # # Variables read: # - WORKSPACE - Jenkins workspace to create csit subdirectory in. +# - GIT_URL - Git clone URL # - GERRIT_BRANCH - Jenkins configured GERRIT_BRANCH parameter equal to required # CSIT branch. # - CSIT_REF - Override ref of CSIT git repository to checkout. @@ -29,10 +30,10 @@ set -exuo pipefail # - Multiple other side effects by entry script(s), see CSIT repository. cd "${WORKSPACE}" -git clone https://gerrit.fd.io/r/csit --depth=1 --no-single-branch --no-checkout +git clone "${GIT_URL}/csit" --depth=1 --no-single-branch --no-checkout pushd "${WORKSPACE}/csit" if [[ -n "${CSIT_REF-}" ]]; then - git fetch --depth=1 https://gerrit.fd.io/r/csit "${CSIT_REF}" + git fetch --depth=1 "${GIT_URL}/csit" "${CSIT_REF}" git checkout FETCH_HEAD else git checkout "${GERRIT_BRANCH}" diff --git a/jjb/scripts/vpp/check_crc.sh b/jjb/scripts/vpp/check_crc.sh old mode 100644 new mode 100755 index 2e07c2b5e..c0a9d507d --- a/jjb/scripts/vpp/check_crc.sh +++ b/jjb/scripts/vpp/check_crc.sh @@ -21,16 +21,17 @@ set -exuo pipefail # # Variables read: # - WORKSPACE - Jenkins workspace to create csit subdirectory in. +# - GIT_URL - Git clone URL # - CSIT_REF - Override ref of CSIT git repository to checkout. # Directories updated: # - ${WORKSPACE}/csit - Created, holding a checked out CSIT repository. # - Multiple other side effects by entry script(s), see CSIT repository. cd "${WORKSPACE}" -git clone https://gerrit.fd.io/r/csit --depth=1 --no-single-branch --no-checkout +git clone "${GIT_URL}/csit" --depth=1 --no-single-branch --no-checkout pushd "${WORKSPACE}/csit" if [[ -n "${CSIT_REF-}" ]]; then - git fetch --depth=1 https://gerrit.fd.io/r/csit "${CSIT_REF}" + git fetch --depth=1 "${GIT_URL}/csit" "${CSIT_REF}" git checkout FETCH_HEAD else git checkout HEAD diff --git a/jjb/scripts/vpp/csit-device.sh b/jjb/scripts/vpp/csit-device.sh old mode 100644 new mode 100755 index 6d4beb80f..989193001 --- a/jjb/scripts/vpp/csit-device.sh +++ b/jjb/scripts/vpp/csit-device.sh @@ -21,16 +21,17 @@ set -exuo pipefail # # Variables read: # - WORKSPACE - Jenkins workspace to create csit subdirectory in. +# - GIT_URL - Git clone URL # - CSIT_REF - Override ref of CSIT git repository to checkout. # Directories updated: # - ${WORKSPACE}/csit - Created, holding a checked out CSIT repository. # - Multiple other side effects by entry script(s), see CSIT repository. cd "${WORKSPACE}" -git clone https://gerrit.fd.io/r/csit --depth=1 --no-single-branch --no-checkout +git clone "${GIT_URL}/csit" --depth=1 --no-single-branch --no-checkout pushd "${WORKSPACE}/csit" if [[ -n "${CSIT_REF-}" ]]; then - git fetch --depth=1 https://gerrit.fd.io/r/csit "${CSIT_REF}" + git fetch --depth=1 "${GIT_URL}/csit" "${CSIT_REF}" git checkout FETCH_HEAD else git checkout HEAD diff --git a/jjb/scripts/vpp/csit-perf.sh b/jjb/scripts/vpp/csit-perf.sh old mode 100644 new mode 100755 index e57306651..ee0b500c6 --- a/jjb/scripts/vpp/csit-perf.sh +++ b/jjb/scripts/vpp/csit-perf.sh @@ -21,16 +21,17 @@ set -exuo pipefail # # Variables read: # - WORKSPACE - Jenkins workspace to create csit subdirectory in. +# - GIT_URL - Git clone URL # - CSIT_REF - Override ref of CSIT git repository to checkout. # Directories updated: # - ${WORKSPACE}/csit - Created, holding a checked out CSIT repository. # - Multiple other side effects by entry script(s), see CSIT repository. cd "${WORKSPACE}" -git clone https://gerrit.fd.io/r/csit --depth=1 --no-single-branch --no-checkout +git clone "${GIT_URL}/csit" --depth=1 --no-single-branch --no-checkout pushd "${WORKSPACE}/csit" if [[ -n "${CSIT_REF-}" ]]; then - git fetch --depth=1 https://gerrit.fd.io/r/csit "${CSIT_REF}" + git fetch --depth=1 "${GIT_URL}/csit" "${CSIT_REF}" git checkout FETCH_HEAD else git checkout HEAD -- cgit 1.2.3-korg