From 0d6e0fa565cf5093b6d8640983fae72f26e6b837 Mon Sep 17 00:00:00 2001 From: Liosha84 Date: Thu, 29 Oct 2026 00:25:37 +0100 Subject: [PATCH 1/2] fix(docker): skip frontend Gradle tasks when SKIP_FRONTEND is set Add onlyIf predicate to installFrontendDependencies and buildFrontend tasks so they are skipped when SKIP_FRONTEND env var is present. This fixes the Docker multi-stage build which failed because Gradle validated input files (package.json, package-lock.json) that don't exist in the builder stage. Also moved the skipFrontend variable definition before task registration for cleaner code organization. Co-authored-by: Junie --- backend/build.gradle | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/build.gradle b/backend/build.gradle index 4f5a920..495bb88 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -35,7 +35,11 @@ def frontendDir = file('../frontend') def frontendDistDir = file('../frontend/dist/frontend/browser') def springStaticDir = file('src/main/resources/static') +// Skip frontend build tasks when building inside Docker (frontend already built in Stage 1) +def skipFrontend = project.hasProperty('skipFrontend') || System.getenv('SKIP_FRONTEND') != null + tasks.register('installFrontendDependencies', Exec) { + onlyIf { !skipFrontend } workingDir frontendDir inputs.file(file('../frontend/package.json')) @@ -50,6 +54,7 @@ tasks.register('installFrontendDependencies', Exec) { } tasks.register('buildFrontend', Exec) { + onlyIf { !skipFrontend } dependsOn 'installFrontendDependencies' workingDir frontendDir @@ -66,9 +71,6 @@ tasks.register('buildFrontend', Exec) { } } -// Skip frontend build tasks when building inside Docker (frontend already built in Stage 1) -def skipFrontend = project.hasProperty('skipFrontend') || System.getenv('SKIP_FRONTEND') != null - tasks.register('copyFrontend', Copy) { onlyIf { !skipFrontend } dependsOn 'buildFrontend' -- 2.54.0 From d4a67269306bbd266180c0add06a8f744ec22d07 Mon Sep 17 00:00:00 2001 From: Liosha84 Date: Thu, 29 Oct 2026 00:39:31 +0100 Subject: [PATCH 2/2] feat: automatic releases on merge to main MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Drone now triggers on push to main branch instead of Git tags - Each merge produces two Docker tags: main-{commit-sha} and main-latest - No manual Git tags needed — merging PR develop → main is the release - Updated docs/DEVELOPMENT.md with new Git-flow workflow - Updated CHANGELOG.md with automatic releases feature --- .drone.yml | 8 +++--- .idea/compiler.xml | 7 +++++ CHANGELOG.md | 3 ++ docs/DEVELOPMENT.md | 70 ++++++++++++++++++++++++++++----------------- 4 files changed, 58 insertions(+), 30 deletions(-) diff --git a/.drone.yml b/.drone.yml index fddc745..f90a491 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,7 +4,7 @@ name: build-and-push trigger: event: - - tag + - push - pull_request steps: @@ -24,11 +24,11 @@ steps: context: . registry: gitea.jambotron.com repo: gitea.jambotron.com/liosha84/htop-web - auto_tag: true + tags: ${DRONE_COMMIT_SHA:0:7},main-latest username: from_secret: REGISTRY_USERNAME password: from_secret: REGISTRY_PASSWORD when: - event: - - tag + branch: + - main diff --git a/.idea/compiler.xml b/.idea/compiler.xml index fea4714..802f543 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,5 +1,12 @@ + + + + + + +