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 ()
74
74
get.commit.status ()
75
75
{ # $1=project, $2=sha
76
76
api " GET" " projects/${1} /repository/commits/${2} /statuses" \
77
- | jq -r ' .[].status'
77
+ | jq -r ' .[].status' \
78
+ | head -n 1 \
79
+ | tr -d ' [:space:]'
78
80
}
79
81
80
82
poll.commit.status ()
@@ -83,19 +85,17 @@ poll.commit.status ()
83
85
local status laststatus
84
86
85
87
let attempt+=1
86
- laststatus=" pending"
87
88
88
89
while true ; do
89
90
attempt=$(( $attempt + 1 ))
90
- status=$( get.commit.status " ${1} " " ${2} " )
91
+ status=$( echo $( get.commit.status " ${1} " " ${2} " ) )
91
92
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} "
96
96
fi
97
97
98
- case " ${status} " in
98
+ case " ${status:- } " in
99
99
success) return 0 ;;
100
100
failed) return 1 ;;
101
101
canceled) return 1 ;;
Original file line number Diff line number Diff line change 30
30
export BOOST_DOWNLOAD_URL=${BOOST_DOWNLOAD_URL:-${BOOST_CLI_URL}/boost-cli/get-boost-cli}
31
31
32
32
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
33
39
}
34
40
35
41
boost_init_cli () {
87
93
- .boost_setup
88
94
- .boost_rules
89
95
script :
90
- - ${BOOST_EXE} scan repo ${BOOST_CLI_ARGUMENTS:-}
96
+ - ${BOOST_EXE} scan ${BOOST_SCAN_MODE} ${BOOST_CLI_ARGUMENTS:-}
91
97
variables :
92
98
GIT_DEPTH : 1
You can’t perform that action at this time.
0 commit comments