CI aziendale: prove con dati sintetici, installatore e immagine a ogni push, scansioni e pulizia #2

Merged
Alby96 merged 17 commits from ci/pipeline-aziendale into main 2026-10-20 18:04:52 +02:00
2 changed files with 4 additions and 1 deletions
Showing only changes of commit 56fd29be80 - Show all commits

No files matched your search

+3 -1
View File
@@ -282,7 +282,9 @@ jobs:
mv "$CONFIG/config.json.nuovo" "$CONFIG/config.json"
NOMI=("$IMAGE:sha-${GITHUB_SHA::7}")
# :main solo se main è ancora a questo commit: un'esecuzione arrivata in ritardo non lo riporta indietro.
CIMA=$(git ls-remote origin refs/heads/main 2> /dev/null | cut -f1)
# Il passo gira con «bash -e -o pipefail»: senza «|| CIMA=""» un errore di ls-remote chiuderebbe il passo
# prima dell'avviso, e non uscirebbe nemmeno la :sha-.
CIMA=$(git ls-remote origin refs/heads/main 2> /dev/null | cut -f1) || CIMA=""
if [ "$CIMA" = "$GITHUB_SHA" ]; then
NOMI+=("$IMAGE:main")
elif [ -z "$CIMA" ]; then
@@ -95,6 +95,7 @@ public sealed partial class PipelineTests
StringAssert.Contains(publish, "\"$IMAGE:sha-${GITHUB_SHA::7}\"");
StringAssert.Contains(publish, "\"$IMAGE:main\"");
StringAssert.Contains(publish, "bash .gitea/scripts/costruisci-immagine.sh pubblica");
StringAssert.Contains(publish, "| cut -f1) || CIMA=\"\"", "under bash -e an unreadable main must reach the warning and still publish :sha-");
Assert.DoesNotContain(":latest", Code(Workflow("verifica.yml")), ":latest belongs to the release");
// Built with buildx, tried without a network and scanned before anything is published; always cleaned up.