Commit Graph

9 Commits

Author SHA1 Message Date
Martin Tahiraj
3e21e423bf fix(jenkins): update webhook token in Generic Trigger configuration 2026-04-02 15:38:09 +02:00
Martin Tahiraj
4e096de6c9 fix(ci): use correct registry credential ID 'REGISTRY'
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-02 14:52:04 +02:00
Martin Tahiraj
c8dbd399ce refactor(ci): extract inline scripts to ci/scripts/
- ci/scripts/read_meta.py     legge version|build_from da config.yaml/json
- ci/scripts/update_repo.py   upserta repository.json
- ci/scripts/lint_addon.sh    hadolint + yaml/json + shellcheck
- ci/scripts/git_push_repo.sh  commit e push di repository.json

Rimuove writeFile /tmp/ dal Jenkinsfile

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-02 14:46:17 +02:00
Martin Tahiraj
88fe792ca0 fix(jenkins): use GIT_TOKEN as credential ID for Gitea
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-02 14:41:54 +02:00
Martin Tahiraj
b6dc2aefe4 refactor(jenkins): remove redundant Checkout stage
Declarative Pipeline with agent any already runs 'Declarative: Checkout SCM'
automatically before user stages  the explicit stage('Checkout') was cloning
the repo a second time for no reason. Remove it entirely; capture GIT_COMMIT_SHA
and GIT_PREV_SHA at the top of stage('Detect') using the already-present workspace.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-02 14:39:39 +02:00
Martin Tahiraj
18f8d38796 fix(jenkins): move credentials out of environment block to avoid pipeline abort
credentials() in the pipeline-level environment{} block causes an immediate
abort before any stage runs if the credential ID does not exist in Jenkins.
The node is released, post{} runs without a node context, and sh steps fail
with 'Required context class hudson.FilePath is missing'.

Fix: remove REGISTRY_CREDS and GITEA_CREDS from environment{}, replace with
withCredentials() inside the stages that actually need them (Build & Push,
Publish). Wrap post{cleanup} sh calls in try/catch as a safety net.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-02 14:34:48 +02:00
Martin Tahiraj
b9b35f7b41 fix(jenkins): update trigger method to use pollSCM and provide upgrade recommendations for Generic Webhook Trigger 2026-04-02 14:07:53 +02:00
Martin Tahiraj
c62240d0de fix(jenkins): update default GITEA_USER and improve variable naming in notification logic 2026-04-02 13:01:10 +02:00
Martin Tahiraj
90793f500b feat(jenkins): add CI/CD pipeline for HA add-ons with linting, building, and publishing 2026-04-02 12:05:55 +02:00