aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--_tils/2020-11-30-storing-ci-data-on-git-notes.md52
1 files changed, 27 insertions, 25 deletions
diff --git a/_tils/2020-11-30-storing-ci-data-on-git-notes.md b/_tils/2020-11-30-storing-ci-data-on-git-notes.md
index 74beda2..f37419f 100644
--- a/_tils/2020-11-30-storing-ci-data-on-git-notes.md
+++ b/_tils/2020-11-30-storing-ci-data-on-git-notes.md
@@ -73,47 +73,49 @@ The important part is in the `finish()` function:
A commit now has an attached note, and shows it whenever you look at it:
```diff
-$ git show 930ba1888f49f11e52a4a715438cd9f5f413dd9c
-commit 930ba1888f49f11e52a4a715438cd9f5f413dd9c (oldvps/master)
+$ git show 87c57133abd8be5d7cc46afbf107f59b26066575
+commit 87c57133abd8be5d7cc46afbf107f59b26066575
Author: EuAndreh <eu@euandre.org>
-Date: Mon Nov 30 01:11:38 2020 -0300
+Date: Wed Feb 24 21:58:28 2021 -0300
- vps.scm: Uncomment mcron job time marker
+ vps/machines.scm: Change path to cronjob files
Notes:
See CI logs with:
- git notes --ref=refs/notes/ci-logs show 930ba1888f49f11e52a4a715438cd9f5f413dd9c
- git notes --ref=refs/notes/ci-data show 930ba1888f49f11e52a4a715438cd9f5f413dd9c
-
-diff --git a/sync/vps.scm b/sync/vps.scm
-index 3f6ca69..02b9cc6 100644
---- a/sync/vps.scm
-+++ b/sync/vps.scm
-@@ -280,7 +280,7 @@ pki " mail-domain " key \"" (tls-priv-for mail-domain) "\"")))
- tls-prefixes)))
-
- (define generate-ci-index-html-job
-- #~(job "* * * * *" ;; "*/5 * * * *"
-+ #~(job "*/5 * * * *"
- #$(program-file
- "generate-ci-index-html.scm"
- (with-imported-modules (modules:source-module-closure
+ git notes --ref=refs/notes/ci-logs show 87c57133abd8be5d7cc46afbf107f59b26066575
+ git notes --ref=refs/notes/ci-data show 87c57133abd8be5d7cc46afbf107f59b26066575
+
+diff --git a/servers/vps/machines.scm b/servers/vps/machines.scm
+index d1830ca..a4ccde7 100644
+--- a/servers/vps/machines.scm
++++ b/servers/vps/machines.scm
+@@ -262,8 +262,8 @@ pki " mail-domain " key \"" (tls-priv-for mail-domain) "\""))
+ (service mcron-service-type
+ (mcron-configuration
+ (jobs
+- (list #~(job "30 1 * * 1" "guix gc -d")
+- #~(job "30 0 * * *" "/var/lib/euandreh/backup.sh")))))
++ (list #~(job "30 1 * * 1" "/opt/bin/gc.sh")
++ #~(job "30 0 * * *" "/opt/bin/backup.sh")))))
+ (service dhcp-client-service-type)
+ #;
+ (service opensmtpd-service-type
```
Other tools such as [cgit][cgit] will also show notes on the web interface:
-[https://euandreh.xyz/vps.git/commit?id=930ba1888f49f11e52a4a715438cd9f5f413dd9c](https://euandreh.xyz/vps.git/commit?id=930ba1888f49f11e52a4a715438cd9f5f413dd9c)
+<https://euandreh.xyz/servers.git/commit?id=87c57133abd8be5d7cc46afbf107f59b26066575>.
You can go even further: since cgit can serve raw blob directly, you can even
serve such artifacts (log files, release artifacts, binaries) from cgit itself:
```shell
-$ SHA="$(git notes --ref=refs/notes/ci-logs list 930ba1888f49f11e52a4a715438cd9f5f413dd9c)"
-$ echo "https://euandreh.xyz/vps.git/blob?id=$SHA"
-https://euandreh.xyz/vps.git/blob?id=b3a6438a0c7a47864c54c61359b6ef50e864dbff
+$ SHA="$(git notes --ref=refs/notes/ci-logs list 87c57133abd8be5d7cc46afbf107f59b26066575)"
+$ echo "https://euandreh.xyz/servers.git/blob?id=$SHA"
+https://euandreh.xyz/servers.git/blob?id=1707a97bae24e3864fe7943f8dda6d01c294fb5c
```
And like that you'll have cgit serving the artifacts for you:
-[https://euandreh.xyz/vps.git/blob?id=b3a6438a0c7a47864c54c61359b6ef50e864dbff](https://euandreh.xyz/vps.git/blob?id=b3a6438a0c7a47864c54c61359b6ef50e864dbff)
+<https://euandreh.xyz/servers.git/blob?id=1707a97bae24e3864fe7943f8dda6d01c294fb5c>.
[previous-article]: {% link _tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.md %}
[git-notes]: https://git-scm.com/docs/git-notes