From 51a9914dc8ec02b053a5594b7478b4d68a750672 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 3 Sep 2021 20:39:10 -0300 Subject: aux/: Update --- aux/ci/ci-build.sh | 12 ++++++++--- aux/ci/git-post-receive.sh | 3 ++- aux/ci/report.sh | 54 +++++++++++++++++++++++++--------------------- 3 files changed, 41 insertions(+), 28 deletions(-) (limited to 'aux/ci') diff --git a/aux/ci/ci-build.sh b/aux/ci/ci-build.sh index 17e9e37..2ec0102 100755 --- a/aux/ci/ci-build.sh +++ b/aux/ci/ci-build.sh @@ -8,7 +8,8 @@ FILENAME="$(date -Is)-$SHA.log" LOGFILE="$LOGS_DIR/$FILENAME" mkdtemp() { - name="$(echo 'mkstemp(template)' | m4 -D template="${TMPDIR:-/tmp}/m4-tmpname.")" + name="$(echo 'mkstemp(template)' | + m4 -D template="${TMPDIR:-/tmp}/m4-tmpname.")" rm -f "$name" mkdir "$name" echo "$name" @@ -37,7 +38,13 @@ EOF sh aux/ci/report.sh -n "$PROJECT" -o public rsync -av public/ "/srv/http/$PROJECT/" --delete - printf "\n>>>\n>>> CI logs added as Git note.\n>>>\n>>> Run status was %s\n\n" "$STATUS" + if [ -f aux/guix/with-container.sh ]; then + cp "$(sh aux/guix/with-container.sh -C)" \ + "/srv/http/$PROJECT/docker.tar.gz" + fi + + printf '\n>>>\n>>> CI logs added as Git note.\n>>>\n>>> Run status was %s\n>>>\n\n' \ + "$STATUS" } trap finish EXIT @@ -47,7 +54,6 @@ EOF git clone "$REMOTE" . git config --global user.email git@euandre.org git config --global user.name 'EuAndreh CI' - git annex get ||: if [ -f aux/guix/with-container.sh ]; then RUNNER='sh aux/guix/with-container.sh' diff --git a/aux/ci/git-post-receive.sh b/aux/ci/git-post-receive.sh index 426bff3..92bba73 100755 --- a/aux/ci/git-post-receive.sh +++ b/aux/ci/git-post-receive.sh @@ -4,7 +4,8 @@ set -eu for n in $(seq 0 $((GIT_PUSH_OPTION_COUNT - 1))); do opt="$(eval "echo \$GIT_PUSH_OPTION_$n")" if [ "$opt" = skip-ci ] || [ "$opt" = ci-skip ]; then - printf "\n'%s' option detected, not running ci-build.sh\n\n" "$opt" + printf "\n'%s' option detected, not running ci-build.sh\n\n" \ + "$opt" exit 0 fi done diff --git a/aux/ci/report.sh b/aux/ci/report.sh index 1aa41a0..6f18f0f 100755 --- a/aux/ci/report.sh +++ b/aux/ci/report.sh @@ -41,29 +41,36 @@ for c in $(git notes list | cut -d\ -f2); do DATA="$(git notes --ref=refs/notes/ci-data show "$c")" FILENAME="$(echo "$DATA" | cut -d\ -f2)" echo "$DATA" > "$OUTDIR/ci-data/$FILENAME" - git notes --ref=refs/notes/ci-logs show "$c" > "$OUTDIR/ci-logs/$FILENAME" + git notes --ref=refs/notes/ci-logs show "$c" \ + > "$OUTDIR/ci-logs/$FILENAME" done cat <> "$OUT" - - - - - CI logs for $PROJECT + + + + + + $PROJECT - CI logs - - - -

- CI logs for $PROJECT -

- - + + + EOF -- cgit v1.2.3