diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9ab8c2b48eb0d270bc64145f5d8ba073a844b1df..9a57a8fa84ff522e4b5f7a9849245cc1a44d888e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,6 +47,29 @@ stages: done ; fi +.report: + image: curlimages/curl:latest + before_script: [] + script: + - | + if [ -n "${GITHUB_PR}" ] ; then + BODY=$( + echo "<details><summary>geoviewer</summary>" ; + for config in ${DETECTOR_CONFIG//,/ } ; do + url=${TARGET_URL/%config%/${config}} ; + echo "- [$config]($url)" ; + done ; + echo "</details>" ; + ) ; + curl \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: token ${GITHUB_REPO_STATUS_TOKEN}" \ + "https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${GITHUB_PR}/comments" \ + -d '{"body":"'"${BODY}"'"}' ; + fi + + geoviewer:pending: stage: status-pending extends: .status @@ -105,10 +128,8 @@ convert: report: stage: finish + extends: .report needs: ["convert"] - script: - - echo "It was a success!" - allow_failure: true geoviewer:success: stage: status-report