diff options
author | EuAndreh <eu@euandre.org> | 2020-11-30 15:29:06 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-11-30 15:29:06 -0300 |
commit | aaab9f95520a5f591053efef321ddb100980b7dc (patch) | |
tree | 20f7508bdfec1473042ee4f30bd02fbc5be56417 /locale/fr | |
parent | Fix pastebin layout (diff) | |
download | euandre.org-aaab9f95520a5f591053efef321ddb100980b7dc.tar.gz euandre.org-aaab9f95520a5f591053efef321ddb100980b7dc.tar.xz |
Update po files
Diffstat (limited to '')
-rw-r--r-- | locale/fr/LC_MESSAGES/_pastebins/2020-11-27-guix-build-local-module.po | 60 | ||||
-rw-r--r-- | locale/fr/LC_MESSAGES/_tils/2020-11-30-storing-ci-data-on-git-notes.po | 146 |
2 files changed, 206 insertions, 0 deletions
diff --git a/locale/fr/LC_MESSAGES/_pastebins/2020-11-27-guix-build-local-module.po b/locale/fr/LC_MESSAGES/_pastebins/2020-11-27-guix-build-local-module.po new file mode 100644 index 0000000..047d848 --- /dev/null +++ b/locale/fr/LC_MESSAGES/_pastebins/2020-11-27-guix-build-local-module.po @@ -0,0 +1,60 @@ +# +msgid "" +msgstr "" + +msgid "" +"title: Guix build local module\n" +"date: 2020-11-27\n" +"layout: pastebin\n" +"lang: en" +msgstr "" + +msgid "Inside a file named `build.scm`:" +msgstr "" + +msgid "" +"(define-module (build)\n" +" #:use-module (guix packages)\n" +" #:use-module (guix download)\n" +" #:use-module (guix build-system gnu)\n" +" #:use-module (guix licenses))\n" +"\n" +"(define-public my-hello\n" +" (package\n" +" (name \"hello\")\n" +" (version \"2.10\")\n" +" (source (origin\n" +" (method url-fetch)\n" +" (uri (string-append \"mirror://gnu/hello/hello-\" version\n" +" \".tar.gz\"))\n" +" (sha256\n" +" (base32\n" +" \"0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i\"))))\n" +" (build-system gnu-build-system)\n" +" (synopsis \"\")\n" +" (description \"\")\n" +" (home-page \"\")\n" +" (license gpl3+)))\n" +"\n" +msgstr "" + +msgid "A plain build command didn't work:" +msgstr "" + +msgid "" +"$ guix build -L. my-hello\n" +"guix build: error: my-hello : paquet inconnu\n" +msgstr "" + +msgid "But with an eval expression it did:" +msgstr "" + +msgid "" +"$ guix build -L. -e '(@ (build) my-hello)'\n" +"# works\n" +msgstr "" + +msgid "" +"FIXED: rename `name` on line 9 of the first snippet, and use `\"my-hello\"` " +"instead of `\"hello\"`." +msgstr "" diff --git a/locale/fr/LC_MESSAGES/_tils/2020-11-30-storing-ci-data-on-git-notes.po b/locale/fr/LC_MESSAGES/_tils/2020-11-30-storing-ci-data-on-git-notes.po new file mode 100644 index 0000000..f6b6e2c --- /dev/null +++ b/locale/fr/LC_MESSAGES/_tils/2020-11-30-storing-ci-data-on-git-notes.po @@ -0,0 +1,146 @@ +# +msgid "" +msgstr "" + +msgid "title: Storing CI data on Git notes" +msgstr "" + +msgid "date: 2020-11-30" +msgstr "" + +msgid "layout: post" +msgstr "" + +msgid "lang: en" +msgstr "" + +msgid "ref: storing-ci-data-on-git-notes" +msgstr "" + +msgid "" +"Extending the bare bones CI server I've [talked about before][previous-" +"article], divoplade on Freenode suggested storing CI artifacts on [Git " +"notes][git-notes], such as tarballs, binaries, logs, *etc*." +msgstr "" + +msgid "" +"I've written a small script that will put log files and CI job data on Git " +"notes, and make it visible on the porcelain log. It is a simple extension of" +" the previous article:" +msgstr "" + +msgid "" +"#!/usr/bin/env bash\n" +"set -Eeuo pipefail\n" +"set -x\n" +"\n" +"PREFIX='/srv/ci/vps'\n" +"mkdir -p \"$PREFIX\"\n" +"read -r _ SHA _ # oldrev newrev refname\n" +"FILENAME=\"$(date -Is)-$SHA.log\"\n" +"LOGFILE=\"$PREFIX/$FILENAME\"\n" +"exec &> >(tee -a \"$LOGFILE\")\n" +"\n" +"echo \"Starting CI job at: $(date -Is)\"\n" +"\n" +"finish() {\n" +" STATUS=\"$?\"\n" +" printf \"\\n\\n>>> exit status was %s\\n\" \"$STATUS\"\n" +" echo \"Finishing CI job at: $(date -Is)\"\n" +" popd\n" +" NOTE=$(cat <<EOF\n" +"See CI logs with:\n" +" git notes --ref=refs/notes/ci-logs show $SHA\n" +" git notes --ref=refs/notes/ci-data show $SHA\n" +"EOF\n" +")\n" +" git notes --ref=refs/notes/ci-data add -f -m \"$STATUS $FILENAME\"\n" +" git notes --ref=refs/notes/ci-logs add -f -F \"$LOGFILE\"\n" +" git notes add -f -m \"$NOTE\"\n" +" printf \"\\n\\n>>> CI logs added as Git note.\"\n" +"}\n" +"trap finish EXIT\n" +"\n" +"unset GIT_DIR\n" +"CLONE=\"$(mktemp -d)\"\n" +"git clone . \"$CLONE\"\n" +"pushd \"$CLONE\"\n" +"git config --global user.email git@euandre.org\n" +"git config --global user.name 'EuAndreh CI'\n" +"\n" +"./container make check site\n" +"./container make publish\n" +msgstr "" + +msgid "The important part is in the `finish()` function:" +msgstr "" + +msgid "" +"#25 stores the exit status and the generated filename separated by spaces;" +msgstr "" + +msgid "#26 adds the log file in a note using the `refs/notes/ci-logs` ref;" +msgstr "" + +msgid "#27 it adds a note to the commit saying how to see the logs." +msgstr "" + +msgid "" +"A commit now has an attached note, and shows it whenever you look at it:" +msgstr "" + +msgid "" +"$ git show 930ba1888f49f11e52a4a715438cd9f5f413dd9c\n" +"commit 930ba1888f49f11e52a4a715438cd9f5f413dd9c (oldvps/master)\n" +"Author: EuAndreh <eu@euandre.org>\n" +"Date: Mon Nov 30 01:11:38 2020 -0300\n" +"\n" +" vps.scm: Uncomment mcron job time marker\n" +"\n" +"Notes:\n" +" See CI logs with:\n" +" git notes --ref=refs/notes/ci-logs show 930ba1888f49f11e52a4a715438cd9f5f413dd9c\n" +" git notes --ref=refs/notes/ci-data show 930ba1888f49f11e52a4a715438cd9f5f413dd9c\n" +"\n" +"diff --git a/sync/vps.scm b/sync/vps.scm\n" +"index 3f6ca69..02b9cc6 100644\n" +"--- a/sync/vps.scm\n" +"+++ b/sync/vps.scm\n" +"@@ -280,7 +280,7 @@ pki \" mail-domain \" key \\\"\" (tls-priv-for mail-domain) \"\\\"\")))\n" +" tls-prefixes)))\n" +"\n" +" (define generate-ci-index-html-job\n" +"- #~(job \"* * * * *\" ;; \"*/5 * * * *\"\n" +"+ #~(job \"*/5 * * * *\"\n" +" #$(program-file\n" +" \"generate-ci-index-html.scm\"\n" +" (with-imported-modules (modules:source-module-closure\n" +msgstr "" + +msgid "" +"Other tools such as [cgit][cgit] will also show notes on the web interface: " +"[https://git.euandreh.xyz/vps/commit?id=930ba1888f49f11e52a4a715438cd9f5f413dd9c](https://git.euandreh.xyz/vps/commit?id=930ba1888f49f11e52a4a715438cd9f5f413dd9c)" +msgstr "" + +msgid "" +"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:" +msgstr "" + +msgid "" +"$ SHA=\"$(git notes --ref=refs/notes/ci-logs list 930ba1888f49f11e52a4a715438cd9f5f413dd9c)\"\n" +"$ echo \"https://git.euandreh.xyz/vps/blob?id=$SHA\"\n" +"https://git.euandreh.xyz/vps/blob?id=b3a6438a0c7a47864c54c61359b6ef50e864dbff\n" +msgstr "" + +msgid "" +"And like that you'll have cgit serving the artifacts for you: " +"[https://git.euandreh.xyz/vps/blob?id=b3a6438a0c7a47864c54c61359b6ef50e864dbff](https://git.euandreh.xyz/vps/blob?id=b3a6438a0c7a47864c54c61359b6ef50e864dbff)" +msgstr "" + +msgid "" +"[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 [cgit]: " +"https://git.zx2c4.com/cgit/about/" +msgstr "" |