From 5b8e0623095288e2359b23e26b0201f0f6d74f0b Mon Sep 17 00:00:00 2001 From: Ludger Sicking Date: Mon, 10 Aug 2026 15:45:54 +0200 Subject: [PATCH] pimp build workflow... and add workflow for testing run pipeline manual in woodpecker --- .woodpecker/build_and_copy_website.yaml | 5 +-- .woodpecker/build_and_test_website.yaml | 50 +++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 .woodpecker/build_and_test_website.yaml diff --git a/.woodpecker/build_and_copy_website.yaml b/.woodpecker/build_and_copy_website.yaml index 1132bb1..cbf52b8 100644 --- a/.woodpecker/build_and_copy_website.yaml +++ b/.woodpecker/build_and_copy_website.yaml @@ -20,12 +20,11 @@ steps: - hugo version - mkdir Website/PROD - - hugo -s Website -d PROD --logLevel debug + - hugo -s Website -d PROD --logLevel error - ls -la Website/PROD/index.html - - if grep -E "Team vollständig" Website/PROD/index.html; then echo "Blog Teamseite"; else echo "Webseite Startseite"; fi + - if grep -E "Team vollständig" Website/PROD/index.html; then echo "Fehlerhafte Startseite! Artikel vorhanden..."; else echo "Startseite OK"; fi - echo $? - - grep -E "Du hast sogar schon mal selbst Materialien erstellt" Website/PROD/index.html - name: copy_to_server diff --git a/.woodpecker/build_and_test_website.yaml b/.woodpecker/build_and_test_website.yaml new file mode 100644 index 0000000..48a678b --- /dev/null +++ b/.woodpecker/build_and_test_website.yaml @@ -0,0 +1,50 @@ +when: + - branch: + include: * + exclude: [main] + event: manual + path: + include: ['Website/**'] + on_empty: false + +steps: + - name: TEST-log_start_time + image: alpine + commands: + - date -I'seconds' + + - name: TEST-build_and_test_site + image: alpine:3.24 # PaperMod (Stand 2026-05) braucht Hugo >= 0.146; alpine:3.24 liefert 0.160.1 + commands: + - date -I'seconds' + - cat /etc/alpine-release + - apk add --no-cache hugo + - hugo version + - apk add --no-cache curl + + - mkdir Website/PROD + - hugo -s Website -d PROD --logLevel debug + - echo 'curl 1-> ' + - curl -s http://localhost:1313/de/ | grep -A 5 -B 5 "article\|post\|Post" | head -80) + - echo 'curl 2-> ' + - curl -s http://localhost:1313/de/ 2>/dev/null | grep -o '' | head -5 | cut -c1-200 + - echo 'curl 3-> ' + - curl -s http://localhost:1313/ | grep -oP '' | head -20 + - echo 'curl 4-> ' + - curl -s http://localhost:1313/blog/ | grep -i "article\|interview\|reliGlobal\|post-entry" | head -10 + + - echo " -- -- -- -- -- **** -- -- -- -- --" + - echo "Test auf Artikel (entry) auf Startseite" + - echo 'curl 5-> ' + - curl -s http://localhost:1313/ | grep -A 5 -B 5 -E "class.+entry-" | head -25 + - echo " -- -- -- -- -- **** -- -- -- -- --" + + - ls -la Website/PROD/index.html + - if grep -E "Team vollständig" Website/PROD/index.html | grep -v -E "meta .+:description" ; then echo "Fehlerhafte Startseite! Artikel vorhanden..."; else echo "Startseite OK"; fi + - echo $? + - grep -E "Du hast sogar schon mal selbst Materialien erstellt" Website/PROD/index.html + + - name: TEST-log_end_time + image: alpine + commands: + - date -I'seconds'