File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,9 @@ del.merge_request.id ()
7474get.commit.status ()
7575{ # $1=project, $2=sha
7676 api " GET" " projects/${1} /repository/commits/${2} /statuses" \
77- | jq -r ' .[].status'
77+ | jq -r ' .[].status' \
78+ | head -n 1 \
79+ | tr -d ' [:space:]'
7880}
7981
8082poll.commit.status ()
@@ -83,19 +85,17 @@ poll.commit.status ()
8385 local status laststatus
8486
8587 let attempt+=1
86- laststatus=" pending"
8788
8889 while true ; do
8990 attempt=$(( $attempt + 1 ))
90- status=$( get.commit.status " ${1} " " ${2} " )
91+ status=$( echo $( get.commit.status " ${1} " " ${2} " ) )
9192
92- info " polling commit status: ${attempt} or ${POLL_ATTEMPTS} "
93-
94- if [ " ${status} " != " ${laststatus} " ]; then
95- info " - pipeline in ${status:- $laststatus } "
93+ info " polling commit status: ${attempt} "
94+ if [ " ${status:- } " != " ${laststatus:- } " ]; then
95+ info " - pipeline in ${status:- none} was ${laststatus:- none} "
9696 fi
9797
98- case " ${status} " in
98+ case " ${status:- } " in
9999 success) return 0 ;;
100100 failed) return 1 ;;
101101 canceled) return 1 ;;
Original file line number Diff line number Diff line change 3030 export BOOST_DOWNLOAD_URL=${BOOST_DOWNLOAD_URL:-${BOOST_CLI_URL}/boost-cli/get-boost-cli}
3131
3232 export BOOST_LOG_COLORS="true"
33+
34+ if [ -n "${BOOST_TRIGGER_ID:-}" ]; then
35+ export BOOST_SCAN_MODE="trigger"
36+ else
37+ export BOOST_SCAN_MODE="repo"
38+ fi
3339 }
3440
3541 boost_init_cli () {
8793 - .boost_setup
8894 - .boost_rules
8995 script :
90- - ${BOOST_EXE} scan repo ${BOOST_CLI_ARGUMENTS:-}
96+ - ${BOOST_EXE} scan ${BOOST_SCAN_MODE} ${BOOST_CLI_ARGUMENTS:-}
9197 variables :
9298 GIT_DEPTH : 1
You can’t perform that action at this time.
0 commit comments