X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;ds=sidebyside;f=jenkins-init-scripts%2Flf-env.sh;h=f0341f345f4e7c5307b0cd1eff9e13ef641f4217;hb=refs%2Fchanges%2F11%2F62611%2F2;hp=ae28a19db3d6244323623c93e9c88dea2e274271;hpb=4ac79cd48227bbbfadbab995dc4535a61a7ee26f;p=releng%2Fglobal-jjb.git diff --git a/jenkins-init-scripts/lf-env.sh b/jenkins-init-scripts/lf-env.sh index ae28a19d..f0341f34 100644 --- a/jenkins-init-scripts/lf-env.sh +++ b/jenkins-init-scripts/lf-env.sh @@ -145,7 +145,7 @@ function lf-activate-venv() return 1 fi - echo "${FUNCNAME[0]}(): Creating '$python' venv ($lf_tmp_venv)" + echo "${FUNCNAME[0]}(): INFO: Creating '$python' venv ($lf_tmp_venv)" case $python in python2*) @@ -176,7 +176,6 @@ function lf-activate-venv() return 0 fi echo "${FUNCNAME[0]}(): INFO: Installing: $pkg_list" - echo "Installing: $pkg_list" $lf_tmp_venv/bin/pip install --upgrade --quiet --upgrade-strategy eager \ $pkg_list || return 1 ;; @@ -185,7 +184,7 @@ function lf-activate-venv() return 1 ;; esac - echo "${FUNCNAME[0]}(): Adding $lf_tmp_venv/bin to PATH" + echo "${FUNCNAME[0]}(): INFO: Adding $lf_tmp_venv/bin to PATH" PATH=$lf_tmp_venv/bin:$PATH return 0 @@ -219,10 +218,12 @@ function lf-git-validate-jira-urls() base_url=$(echo "$JIRA_URL" | awk -F'/' '{print $3}') jira_link=$(git rev-list --format=%B --max-count=1 HEAD | grep -io "http[s]*://$base_url/" || true) if [[ -n $jira_link ]]; then - lf-echo-error 'Remove JIRA URLs from commit message' - lf-echo-error 'Add jira references as: Issue: -, instead of URLs' + lf-echo-stderr "${FUNCNAME[0]}(): ERROR: JIRA URL found in commit message" + lf-echo-stderr 'Add jira references as: Issue: -, instead of URLs' return 1 fi + else + echo "${FUNCNAME[0]}(): WARNING: JIRA_URL not set, continuing anyway" fi return 0 } @@ -251,12 +252,12 @@ function lf-git-validate-jira-urls() function lf-jjb-check-ascii() { if [[ ! -d "jjb" ]]; then - lf-echo-error "${FUNCNAME[0]}(): ERROR: missing jjb directory" - lf-echo-error "This function can only be run from top of global-jjb directory" + lf-echo-stderr "${FUNCNAME[0]}(): ERROR: missing jjb directory" + lf-echo-stderr "This function can only be run from top of global-jjb directory" return 1 fi if LC_ALL=C grep -I -r '[^[:print:][:space:]]' jjb/; then - lf-echo-error "${FUNCNAME[0]}(): ERROR: Found YAML files containing non-printable characters." + lf-echo-stderr "${FUNCNAME[0]}(): ERROR: Found YAML files containing non-printable characters." return 1 fi echo "${FUNCNAME[0]}(): INFO: All JJB YAML files contain only printable ASCII characters"