[Buildkite] Utilise annotations for build notifications (#700)

* [Buildkite] Utilise annotations for artifact and doc bypass notifications

* [Buildkite] Add context to annotations

* [Buildkite] Adjust docs annotation to display for PRs
pull/703/head
Amir Zarrinkafsh 2020-03-11 10:25:47 +11:00 committed by GitHub
parent 7d7ad9bd28
commit 8b80be4061
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,24 @@
<h4>Artifacts</h4>
<dl class="flex flex-wrap mxn1">
<div class="m1">
<dt>amd64</dt>
<dd>
<a href="artifact://authelia-linux-amd64.tar.gz">authelia-linux-amd64.tar.gz</a><br>
<a href="artifact://authelia-linux-amd64.tar.gz.sha256">authelia-linux-amd64.tar.gz.sha256</a>
</dd>
</div>
<div class="m1">
<dt>arm32v7</dt>
<dd>
<a href="artifact://authelia-linux-arm32v7.tar.gz">authelia-linux-arm32v7.tar.gz</a><br>
<a href="artifact://authelia-linux-arm32v7.tar.gz.sha256">authelia-linux-arm32v7.tar.gz.sha256</a>
</dd>
</div>
<div class="m1">
<dt>arm64v8</dt>
<dd>
<a href="artifact://authelia-linux-arm64v8.tar.gz">authelia-linux-arm64v8.tar.gz</a><br>
<a href="artifact://authelia-linux-arm64v8.tar.gz.sha256">authelia-linux-arm64v8.tar.gz.sha256</a>
</dd>
</div>
</dl>

View File

@ -0,0 +1,8 @@
<h4>Documentation Build</h4>
<dl class="flex flex-wrap mxn1">
<div class="m1">
<dd>
CI/CD steps have been skipped as this build only affects documentation.
</dd>
</div>
</dl>

View File

@ -10,6 +10,10 @@ if [[ $BUILDKITE_LABEL =~ ":selenium:" ]] || [[ $BUILDKITE_LABEL =~ ":docker: Bu
fi fi
fi fi
if [[ $BUILDKITE_LABEL == ":docker: Image Deployments" ]]; then
cat .buildkite/annotations/artifacts | buildkite-agent annotate --style "success" --context "ctx-success"
fi
if [[ $BUILDKITE_LABEL =~ ":docker: Deploy" ]]; then if [[ $BUILDKITE_LABEL =~ ":docker: Deploy" ]]; then
docker logout docker logout
fi fi

View File

@ -7,6 +7,10 @@ else
CI_DOCS_BYPASS=$(git diff --name-only `git merge-base --fork-point origin/master` | sed -rn '/^docs\/.*/!{q1}' && echo true || echo false) CI_DOCS_BYPASS=$(git diff --name-only `git merge-base --fork-point origin/master` | sed -rn '/^docs\/.*/!{q1}' && echo true || echo false)
fi fi
if [[ $CI_DOCS_BYPASS == "true" ]]; then
cat .buildkite/annotations/documentation | buildkite-agent annotate --style "info" --context "ctx-info"
fi
cat << EOF cat << EOF
env: env:
CI_DOCS_BYPASS: ${CI_DOCS_BYPASS} CI_DOCS_BYPASS: ${CI_DOCS_BYPASS}