Add basic nightly pipeline monitoring

This commit is contained in:
José Rebelo 2024-10-27 14:18:08 +00:00
parent 212bf996c3
commit 7acda0d52c

View File

@ -7,7 +7,11 @@ clone:
steps: steps:
check-if-released: check-if-released:
image: codeberg.org/freeyourgadget/android-fdroid-tools:33.0.0 image: codeberg.org/freeyourgadget/android-fdroid-tools:33.0.0
secrets:
- hc_url_nightly_deploy
commands: | commands: |
curl -fsS -m 10 --retry 5 "$${hc_url_nightly_deploy}/start"
RELEASED_VERSION_CODE=$(curl https://freeyourgadget.codeberg.page/fdroid/repo/index-v1.json | jq '.packages."nodomain.freeyourgadget.gadgetbridge.nightly"[0].versionCode') RELEASED_VERSION_CODE=$(curl https://freeyourgadget.codeberg.page/fdroid/repo/index-v1.json | jq '.packages."nodomain.freeyourgadget.gadgetbridge.nightly"[0].versionCode')
CURRENT_VERSION_CODE=$(git rev-list HEAD --count) CURRENT_VERSION_CODE=$(git rev-list HEAD --count)
@ -17,6 +21,7 @@ steps:
then then
echo "This version is already released, we quit!" echo "This version is already released, we quit!"
touch .do_not_build touch .do_not_build
curl -fsS -m 10 --retry 5 "$${hc_url_nightly_deploy}"
fi fi
@ -104,9 +109,19 @@ steps:
# bump # bump
secrets: [ commit_token ] secrets: [ commit_token ]
on-success:
image: codeberg.org/freeyourgadget/android-fdroid-tools:33.0.0
commands:
- curl -fsS -m 10 --retry 5 "$${hc_url_nightly_deploy}"
when:
status: success
secrets:
- hc_url_nightly_deploy
on-error: on-error:
image: codeberg.org/freeyourgadget/android-fdroid-tools:33.0.0 image: codeberg.org/freeyourgadget/android-fdroid-tools:33.0.0
commands: commands:
- curl -fsS -m 10 --retry 5 "$${hc_url_nightly_deploy}/fail"
- cd .. - cd ..
- mkdir -p repoconfig - mkdir -p repoconfig
- cd repoconfig - cd repoconfig
@ -114,7 +129,9 @@ steps:
- ./fdroid-repo-config/repoconfig/create_issue_comment.sh "CI failed" - ./fdroid-repo-config/repoconfig/create_issue_comment.sh "CI failed"
when: when:
status: failure status: failure
secrets: [ commit_token ] secrets:
- hc_url_nightly_deploy
- commit_token
when: when:
- event: cron - event: cron