Skip to content

Commit 8a365b6

Browse files
committed
Try fixing debug lines...
1 parent a8e6254 commit 8a365b6

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.gitlab/scripts/get-baseline-commit-info.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ get_pipeline_id_for_commit() {
5858
response="$(curl --request GET --silent --show-error --header "PRIVATE-TOKEN: ${private_token}" "${api_url}" || true)"
5959
pipeline_id="$(echo "${response}" | grep -o '"last_pipeline"[^}]*"id":[0-9]*' | grep -o '[0-9]*$' | head -1 || true)"
6060
if [[ -n "${pipeline_id}" && "${pipeline_id}" != "null" ]]; then
61-
echo "Pipeline ID for commit ${commit_sha}: ${pipeline_id}"
61+
echo "Pipeline ID for commit ${commit_sha}: ${pipeline_id}" >&2
62+
echo "${pipeline_id}"
6263
return 0
6364
fi
6465

66+
echo "No pipeline ID found for commit ${commit_sha}" >&2
6567
return 1
6668
}
6769

@@ -73,7 +75,8 @@ get_latest_pipeline_id_for_branch() {
7375
private_token="$(get_private_token)" || return 1
7476
response="$(curl --request GET --silent --show-error --header "PRIVATE-TOKEN: ${private_token}" "${api_url}" || true)"
7577
pipeline_id="$(echo "${response}" | grep -o '"id":[0-9]*' | head -1 | grep -o '[0-9]*' || true)"
76-
echo "Pipeline ID for branch ${branch}: ${pipeline_id}"
78+
echo "Pipeline ID for branch ${branch}: ${pipeline_id}" >&2
79+
echo "${pipeline_id}"
7780
}
7881

7982
resolve_merge_base_sha() {

0 commit comments

Comments
 (0)