diff options
author | Alan Pearce | 2024-04-23 22:44:04 +0200 |
---|---|---|
committer | Alan Pearce | 2024-04-23 22:55:48 +0200 |
commit | afdd3934600d1c4d3e54701677361cea7253e856 (patch) | |
tree | d363a2aaeaa544db569017e1638a4c5a224b0653 /justfile | |
parent | d0a18ee7b2db85c9482b1b096ad3b12a112db6be (diff) | |
download | website-afdd3934600d1c4d3e54701677361cea7253e856.tar.lz website-afdd3934600d1c4d3e54701677361cea7253e856.tar.zst website-afdd3934600d1c4d3e54701677361cea7253e856.zip |
log releases and deploys to sentry
Diffstat (limited to 'justfile')
-rwxr-xr-x | justfile | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/justfile b/justfile index 2c4c464..067be4a 100755 --- a/justfile +++ b/justfile @@ -3,6 +3,9 @@ fly-system := "x86_64-linux" fly-registry := "registry.fly.io/alanpearce-eu" docker-tag := env_var_or_default("DOCKER_TAG", `git rev-parse HEAD`) +version := `sentry-cli releases propose-version` +environment := "production" +started-at := `date +%s` default: @just --list --justfile {{ justfile() }} --unsorted @@ -45,12 +48,22 @@ docker-inspect image-path="result" *skopeo-flags="": print-docker-tag: @echo {{ fly-registry }}:{{ docker-tag }} -stream-to-registry *skopeo-flags="": +stream-to-registry *skopeo-flags="": sentry-create-release && sentry-finalise-release just docker-stream-fly | gzip --fast | skopeo {{ skopeo-flags }} copy --dest-precompute-digests docker-archive:/dev/stdin docker://{{ fly-registry }}:{{ docker-tag }} result := `readlink -f result` push-to-registry *skopeo-flags="": skopeo {{ skopeo-flags }} copy --dest-precompute-digests docker-archive://{{ result }} docker://{{ fly-registry }}:{{ docker-tag }} -deploy registry-and-tag=(fly-registry + ":" + docker-tag): +sentry-create-release: + sentry-cli releases new {{ version }} + +sentry-finalise-release: + sentry-cli releases set-commits {{ version }} --ignore-missing --auto # will not work in CI + sentry-cli releases finalize {{ version }} + +sentry-create-deploy: + sentry-cli releases deploys {{ version }} new --started {{ started-at }} --finished `date +%s` --env {{ environment }} + +deploy registry-and-tag=(fly-registry + ":" + docker-tag): sentry-create-deploy fly deploy --image {{ registry-and-tag }} |