Skip to content

Commit a9c2a90

Browse files
authored
Make everything silent and echo status during poll
1 parent 349a0a7 commit a9c2a90

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

entrypoint.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,19 @@ ci_status="pending"
2929
until [[ "$ci_status" != "pending" && "$ci_status" != "running" ]]
3030
do
3131
sleep $POLL_TIMEOUT
32-
ci_output=$(curl --header "PRIVATE-TOKEN: $GITLAB_PASSWORD" "https://${GITLAB_HOSTNAME}/api/v4/projects/${GITLAB_PROJECT_ID}/pipelines/${pipeline_id}")
32+
ci_output=$(curl --header "PRIVATE-TOKEN: $GITLAB_PASSWORD" --silent "https://${GITLAB_HOSTNAME}/api/v4/projects/${GITLAB_PROJECT_ID}/pipelines/${pipeline_id}")
3333
ci_status=$(jq -n "$ci_output" | jq -r .status)
3434
ci_web_url=$(jq -n "$ci_output" | jq -r .web_url)
3535

36+
echo "Current pipeline status: ${ci_status}"
3637
if [ "$ci_status" = "running" ]
3738
then
38-
echo "Checking GitLab pipeline status..."
39+
echo "Checking pipeline status..."
3940
curl -d '{"state":"pending", "target_url": "'${ci_web_url}'", "context": "gitlab-ci"}' -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.antiope-preview+json" -X POST --silent "https://api.github.com/repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA}" > /dev/null
4041
fi
4142
done
4243

43-
echo "GitLab pipeline finished with status ${ci_status}"
44+
echo "Pipeline finished with status ${ci_status}"
4445

4546
if [ "$ci_status" = "success" ]
4647
then

0 commit comments

Comments
 (0)