Commit Graph

29 Commits

Author SHA1 Message Date
Alessio Dal Santo e125e758fb [Fix] Refactoring calcolo versione CI/CD: usa git describe invece di dotnet msbuild
Problemi risolti:
- GitHub Windows: errore PowerShell 'Missing closing )' causato da (cd Dir; cmd)
  sintassi bash non valida in PowerShell
- GitHub Linux: versione 1.0.0 invece di 2.3.2 perche il tag v2.3.2 esiste solo
  su Gitea e non su GitHub, quindi MinVer trovava il vecchio tag v1.0.0

Soluzione:
- Sostituito dotnet msbuild -getProperty:Version con git describe --tags --abbrev=0
  che e lo strumento nativo Git per ottenere l'ultimo tag raggiungibile
- Funziona identicamente su Linux (bash) e Windows (PowerShell)
- Non richiede dotnet installato ne accesso al .git dentro Docker
- Rimosso il dotnet build intermedio sul runner (non piu necessario)
- Corretti i percorsi version.json: ora usa Data_Coupler/wwwroot/version.json
  dal root del repo invece di wwwroot/ relativo dopo cd
2026-03-22 15:49:42 +01:00
Alessio Dal Santo c15e6c9065 [Fix] Passa versione MinVer come build-arg al Docker per evitare errore MINVER1001
Il problema era che MinVer veniva eseguito dentro il container Docker dove la
directory .git non esiste, causando il warning MINVER1001 e l'uso di 0.0.0-alpha.0
(poi sostituito dal fallback hardcoded 2.1.0).

Soluzione:
- La versione viene calcolata sul runner CI/CD (dove git e' disponibile)
- Esportata come variabile d'ambiente APP_VERSION via GITHUB_ENV
- Passata al Docker build tramite --build-arg APP_VERSION
- Nei Dockerfile aggiunto ARG APP_VERSION e /p:MinVerVersionOverride per imporla
  a MinVer senza che tenti di accedere a git (assente nel container)
- ARG ridichiarato dopo ogni FROM in multi-stage build (comportamento Docker)
2026-03-20 18:25:54 +01:00
Alessio Dal Santo 4262fd6d71 [Fix] Correzione versioning CI/CD: fetch completo storia Git per MinVer
Aggiunto fetch-depth: 0 al checkout in tutti i job dei workflow GitHub Actions e Gitea Actions.
Rimosso --depth 1 dal clone manuale del job Windows in Gitea.
MinVer necessita della storia completa per risalire ai tag Git e calcolare la versione corretta.
Senza questa correzione la versione risultava sempre 2.1.0 (fallback hardcoded).
Aggiornato anche il valore di fallback da 2.1.0 a 2.3.2.
2026-03-20 18:07:34 +01:00
Alessio Dal Santo 593c0b686c fix: Tag latest solo per branch main
- Rimosso tag 'latest' da branch development, staging e dev
- Tag 'latest' ora riservato esclusivamente al branch main
- Altri branch mantengono tag specifici (development-latest, staging-latest, dev-latest)
- Modificati workflow GitHub Actions e Gitea Actions
- Semplifica la gestione delle versioni in produzione vs sviluppo
2026-02-02 12:08:52 +01:00
Alessio Dal Santo ae16f99776 feat: Implementato sistema di versioning automatizzato con MinVer e Gitea Actions
Build and Push Docker Images / Build Linux Container (push) Successful in 6m54s
Build and Push Docker Images / Build Windows Container (push) Has been cancelled
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
- Aggiunto MinVer per calcolo automatico versione da git tags
- Creato modello VersionInfo e servizio VersionService
- Integrato display versione nel NavMenu (Data_Coupler v2.1.0)
- Aggiornato workflow Gitea Actions (Linux e Windows) per generare version.json
- Risolto problema inconsistenza versioning tra container Linux e Windows
- Documentazione completa: VERSIONING_SYSTEM.md e MINVER_SETUP.md
- Versione ora calcolata automaticamente da git tags (Semantic Versioning)
2026-02-02 12:00:05 +01:00
Alessio 81fce773a9 Fix: Ottimizzato Dockerfile e risolto timeout push registry Gitea
Build and Push Docker Images / Build Windows Container (push) Successful in 7s
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
Build and Push Docker Images / Build Linux Container (push) Has been cancelled
- Migrato immagine runtime da Debian a Alpine (riduzione ~60% dimensione)
- Aggiunto suffisso -linux ai tag per manifest multi-platform
- Disabilitate attestations/provenance per ridurre overhead push
- Implementato retry automatico in caso di fallimento push
- Corretto utilizzo apk invece di apt-get per Alpine Linux

Risolve: HTTP 524 timeout durante push immagini al registry
2026-01-25 17:16:53 +01:00
Alessio 5cdad7fb7d Fix: Corretto manifest multi-platform per Gitea Actions
Build and Push Docker Images / Build Windows Container (push) Successful in 8s
Build and Push Docker Images / Build Linux Container (push) Failing after 15m38s
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been skipped
- Aggiunto suffisso -linux ai tag delle immagini Linux per distinguerli
- Aggiornati i comandi del manifest per usare tag espliciti -linux e -windows
- Risolto errore 'not found' durante creazione manifest su branch staging
- Applicato fix a tutti i branch (main, development, dev, staging)
2026-01-25 16:26:21 +01:00
Alessio 505349e10b Aggiornamento workflow per build Windows Docker image 2026-01-24 18:13:07 +01:00
Alessio c0d3f87a7e Rimosso il branch Development dall'action riguardante i container 2026-01-24 18:12:48 +01:00
Alessio e707045d63 [Fix] Clone direttamente in directory corrente (git clone ... .) invece di sottocartella
Build and Push Docker Images / Build Linux Container (push) Failing after 9m5s
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
Build and Push Docker Images / Build Windows Container (push) Has been cancelled
2026-01-24 17:33:07 +01:00
Alessio d8a2069640 [Fix] Semplificato checkout: clone in cartella source e cd, eliminato robocopy
Build and Push Docker Images / Build Windows Container (push) Failing after 20s
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
Build and Push Docker Images / Build Linux Container (push) Has been cancelled
2026-01-24 17:29:53 +01:00
Alessio 7fe8453e7a [Fix] Gestione corretta exit code robocopy (0-7 = success, 8+ = error)
Build and Push Docker Images / Build Windows Container (push) Failing after 1s
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
Build and Push Docker Images / Build Linux Container (push) Has been cancelled
2026-01-24 17:27:13 +01:00
Alessio 8e229fc77c [Fix] Clone da repository Gitea invece di GitHub
Build and Push Docker Images / Build Windows Container (push) Failing after 2s
Build and Push Docker Images / Build Linux Container (push) Has been cancelled
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
- Cambiato URL da github.com a gitea.home-nas-ds.org
- Usa REGISTRY_TOKEN per autenticazione git clone
- Embedded credentials nell'URL (username:token@host)
- Risolve: richiesta credenziali GitHub
2026-01-24 17:23:47 +01:00
Alessio 5915537e83 [Fix] Usa git clone per checkout su Windows
Build and Push Docker Images / Build Windows Container (push) Failing after -2s
Build and Push Docker Images / Build Linux Container (push) Failing after 8m40s
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been skipped
- Sostituito download ZIP con git clone diretto
- Più veloce e affidabile
- Clone shallow (depth 1) per performance
- Verifica Dockerfile.windows dopo clone
- Git è disponibile sul runner Windows
2026-01-24 13:49:57 +01:00
Alessio a50b295c59 [Fix] Migliorato download e extract repository Windows
- Usa robocopy per spostare file (più affidabile di xcopy)
- Logging dettagliato per ogni fase
- Verifica Dockerfile.windows dopo estrazione
- Error handling robusto con exit codes
- Risolve: Dockerfile.windows not found
2026-01-24 13:49:15 +01:00
Alessio 33381a9950 [Fix] Corretto runner Windows da windows-2022 a windows
Build and Push Docker Images / Build Windows Container (push) Failing after 1s
Build and Push Docker Images / Build Linux Container (push) Has been cancelled
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
- Il runner Gitea supporta solo 'windows' generico
- Rimosso riferimento a windows-2022 non esistente
2026-01-24 13:47:51 +01:00
Alessio 5e14c1bc22 [Refactor] Ricostruito workflow Windows con parità Linux
- Stesso flusso e struttura della parte Linux
- Download e extract repository migliorato
- Debug steps per verificare file e secret
- Tagging multipli come Linux (latest, branch-sha, etc.)
- Miglior gestione errori e logging
- Usa windows-2022 come runner specifico
2026-01-24 13:47:06 +01:00
Alessio 5f3f1c4fa6 [Fix] Download repository con curl per Windows
Build and Push Docker Images / Build Windows Container (push) Failing after 1s
Build and Push Docker Images / Build Linux Container (push) Has been cancelled
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
- Gitea Actions non clona automaticamente il repo
- Download repo da GitHub come ZIP con curl
- Estrazione con tar (nativo Windows 10+)
- Spostamento files nella working directory
- Fix: working directory vuota, nessun Dockerfile
2026-01-24 13:45:32 +01:00
Alessio 6ab03ba420 [Debug] Aggiunto debug per Dockerfile.windows
Build and Push Docker Images / Build Windows Container (push) Failing after 2s
Build and Push Docker Images / Build Linux Container (push) Has been cancelled
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
- Aggiunto step per verificare working directory e files
- Controllo esistenza Dockerfile.windows prima del build
- Miglior error handling con exit codes
- Debug: unable to find Dockerfile.windows
2026-01-24 13:44:41 +01:00
Alessio 31c53eff33 [Fix] Rimosso checkout manuale Windows
Build and Push Docker Images / Build Windows Container (push) Failing after 7s
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
Build and Push Docker Images / Build Linux Container (push) Has been cancelled
- Gitea Actions clona automaticamente il repository
- Non serve checkout manuale con git
- Il codice è già presente nella working directory
- Fix: git non riconosciuto su runner Windows
2026-01-24 13:43:22 +01:00
Alessio ee7f925fb3 [Fix] Windows workflow senza Node.js e PowerShell Core
Build and Push Docker Images / Build Windows Container (push) Failing after -1s
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
Build and Push Docker Images / Build Linux Container (push) Has started running
- Rimosso uso di GitHub Actions che richiedono Node.js
- Checkout manuale con git invece di actions/checkout
- Login Docker diretto invece di docker/login-action
- Build e push con script CMD nativo Windows
- Fix: Cannot find pwsh/node in PATH
2026-01-24 13:39:04 +01:00
Alessio 263ae063ac [Fix] Installazione Node.js nel runner Windows
Build and Push Docker Images / Build Windows Container (push) Failing after 12s
Build and Push Docker Images / Build Linux Container (push) Has been cancelled
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
- Aggiunto step per installare Node.js se mancante
- Usa Chocolatey per installazione automatica
- Node.js richiesto dalle GitHub Actions (checkout@v4)
- Fix: Cannot find node in PATH su runner Windows
2026-01-24 13:37:20 +01:00
Alessio 71c38b4e90 -Modificata gitea actions
Build and Push Docker Images / Build Windows Container (push) Failing after 2m21s
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
Build and Push Docker Images / Build Linux Container (push) Has started running
2026-01-24 13:33:28 +01:00
Alessio deeeef984e [Debug] Verifica secret e usa docker login diretto
Build and Push Docker Images / Build Linux Container (push) Failing after 7m56s
Build and Push Docker Images / Build Windows Container (push) Has been cancelled
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
- Aggiunto step per verificare che REGISTRY_TOKEN sia configurato
- Sostituito docker/login-action con docker login diretto
- Aggiunto controllo lunghezza token per debug
- Test con comando bash nativo per maggiore compatibilità
2026-01-24 12:43:58 +01:00
Alessio f3afede0e1 [Debug] Aggiunto debug registry e documentazione troubleshooting
Build and Push Docker Images / Build Linux Container (push) Failing after 18s
Build and Push Docker Images / Build Windows Container (push) Has been cancelled
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
- Aggiunto step debug per verificare accesso al registry
- Documentazione completa su come verificare Container Registry
- Aggiunte istruzioni per registry alternativi (Docker Hub, GHCR)
- Guida per testare autenticazione manualmente
2026-01-24 12:38:48 +01:00
Alessio 16075c10c1 [Fix] Rinominato secret da GITEA_TOKEN a REGISTRY_TOKEN
Build and Push Docker Images / Build Linux Container (push) Failing after 32s
Build and Push Docker Images / Build Windows Container (push) Has been cancelled
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
- Gitea non permette secret che iniziano con GITEA_
- Cambiato nome in REGISTRY_TOKEN in tutti i file
- Aggiornata documentazione con il nuovo nome
- Aggiunta nota sulla limitazione dei nomi secret in Gitea
2026-01-24 12:35:18 +01:00
Alessio 5b1d7d1ea2 [Fix] Correzione autenticazione Gitea Actions
Build and Push Docker Images / Build Linux Container (push) Failing after 1m0s
Build and Push Docker Images / Build Windows Container (push) Has been cancelled
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
- Sostituito gitea.actor con username hardcoded 'alessio'
- Corretto tutti i riferimenti gitea.ref con github.ref
- Gitea Actions usa le stesse variabili di GitHub per compatibilità
- Aggiornata documentazione con spiegazione context variables
- Fix: username nel docker login ora funzionante
2026-01-24 12:33:04 +01:00
Alessio c74a00511c [Fix] Correzione registry Gitea Actions
Build and Push Docker Images / Build Linux Container (push) Failing after 29s
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
Build and Push Docker Images / Build Windows Container (push) Has been cancelled
- Aggiornato registry da gitea.com a gitea.home-nas-ds.org
- Gitea non ha un registry centralizzato pubblico come GitHub
- Configurato per usare istanza self-hosted con Container Registry
- Aggiornata documentazione con istruzioni corrette
- Aggiunte note su configurazione registry e alternative
2026-01-24 12:30:18 +01:00
Alessio 4b27c6a11d [Docs] Aggiunta Gitea Actions per CI/CD automatico
Build and Push Docker Images / Build Linux Container (push) Failing after 27s
Build and Push Docker Images / Build Windows Container (push) Has been cancelled
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
- Creato workflow Gitea Actions (.gitea/workflows/docker-build.yml)
- Documentazione completa setup e configurazione
- Aggiornati README.md e copilot-instructions.md
- Supporto registry Gitea Container Registry (gitea.com)
- Stessa strategia di tagging di GitHub Actions
- Build multi-platform (Linux + Windows)
2026-01-24 12:18:41 +01:00