8 Commits
Author SHA1 Message Date
Liosha84 3e78dcff0f Merge pull request 'feat(drone): add pull request trigger for CI/CD testing' (#1) from develop into master
Reviewed-on: #1
2026-10-29 00:20:20 +01:00
Liosha84andJunie 291167e683 feat(drone): add pull request trigger for CI/CD testing
continuous-integration/drone/pr Build is failing
Co-authored-by: Junie <junie@jetbrains.com>
2026-10-29 00:19:31 +01:00
Liosha84 42f606610a remake of REST Controllers 2026-10-29 00:11:08 +01:00
Liosha84andJunie dc8c6b0dc6 Release v0.3.0: migrate CI/CD to Drone
Co-authored-by: Junie <junie@jetbrains.com>
2026-10-29 00:02:14 +01:00
Liosha84andJunie 7f2ea4f3b4 Fix Drone CI/CD: use from_secret instead of from for secrets
The correct Drone syntax for referencing secrets is 'from_secret:',
not 'from:'. Without this fix, Drone cannot read the registry
credentials and the docker login step will fail with 401 Unauthorized.

Co-authored-by: Junie <junie@jetbrains.com>
2026-10-29 00:00:17 +01:00
Liosha84andJunie 923b1e7c57 Migrate CI/CD from Gitea Actions to Drone
Replace .gitea/workflows/docker.yml with .drone.yml using the Drone
Docker plugin with auto_tag enabled. On Git tag pushes (v0.2.0),
Drone automatically creates Docker image tags: full version (0.2.0),
minor version (0.2), and latest.

Updated docs/DEVELOPMENT.md to document Drone CI/CD setup instead
of Gitea Actions. Updated CHANGELOG.md to reflect the Drone migration.

Co-authored-by: Junie <junie@jetbrains.com>
2026-10-28 23:57:30 +01:00
Liosha84andJunie ee263d6224 Fix: use GITHUB_OUTPUT instead of GITEA_OUTPUT in CI/CD workflow
Docker Build and Push / build-and-push (push) Canceled after 0s
Gitea Actions uses GITHUB_OUTPUT to set step outputs, not GITEA_OUTPUT.
This was causing version and minor variables to be empty, so only the
'latest' tag was pushed to the registry. Added debug logging to help
diagnose future issues.

Co-authored-by: Junie <junie@jetbrains.com>
2026-10-28 23:50:23 +01:00
Liosha84andJunie cb1c8b9a2c Fix: update Gitea token menu name to 'Manage Access Tokens'
Docker Build and Push / build-and-push (push) Canceled after 0s
The actual Gitea UI shows 'Manage Access Tokens' with the subtitle
'These tokens grant access to your account using the Gitea API',
not 'Authorization tokens'. Updated docs/DEVELOPMENT.md to match.

Co-authored-by: Junie <junie@jetbrains.com>
2026-10-28 23:43:13 +01:00
6 changed files with 117 additions and 64 deletions
+34
View File
@@ -0,0 +1,34 @@
kind: pipeline
type: docker
name: build-and-push
trigger:
event:
- tag
- pull_request
steps:
- name: build-test
image: plugins/docker
settings:
dockerfile: Dockerfile
context: .
when:
event:
- pull_request
- name: build-and-push
image: plugins/docker
settings:
dockerfile: Dockerfile
context: .
registry: gitea.jambotron.com
repo: gitea.jambotron.com/liosha84/htop-web
auto_tag: true
username:
from_secret: REGISTRY_USERNAME
password:
from_secret: REGISTRY_PASSWORD
when:
event:
- tag
-50
View File
@@ -1,50 +0,0 @@
name: Docker Build and Push
on:
push:
tags:
- 'v*'
env:
REGISTRY: gitea.jambotron.com
IMAGE_NAME: liosha84/htop-web
jobs:
build-and-push:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract version from tag
id: version
run: |
# Remove 'v' prefix from tag (e.g., v0.1.0 → 0.1.0)
VERSION=$(echo "${{ gitea.ref }}" | sed 's|refs/tags/v||')
echo "version=${VERSION}" >> "${GITEA_OUTPUT}"
# Extract major.minor for minor tag (e.g., 0.1.0 → 0.1)
MINOR=$(echo "${VERSION}" | sed 's/\.[0-9]*$//')
echo "minor=${MINOR}" >> "${GITEA_OUTPUT}"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.minor }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
-7
View File
@@ -1,12 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel>
<module name="backend" target="21" />
<module name="backend.main" target="21" />
<module name="backend.test" target="21" />
</bytecodeTargetLevel>
</component>
<component name="JavacSettings"> <component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE"> <option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="backend" options="-parameters" /> <module name="backend" options="-parameters" />
+5 -1
View File
@@ -6,9 +6,13 @@ This project follows [Semantic Versioning](https://semver.org/). For more detail
## Unreleased ## Unreleased
## v0.3.0
- **CI/CD migrated to Drone** — replaced Gitea Actions with Drone CI/CD (`.drone.yml`). The Docker plugin `auto_tag` feature automatically creates Semantic Versioning tags (`0.3.0`, `0.3`) on Git tag pushes. Configure `REGISTRY_USERNAME` and `REGISTRY_PASSWORD` secrets in the Gitea repository settings.
## v0.2.0 ## v0.2.0
- **CI/CD with Gitea Actions** — automated Docker image build and push on Git tags. Each release produces three tags: full version (`0.2.0`), minor version (`0.2`), and `latest`. Configure `REGISTRY_USERNAME` and `REGISTRY_PASSWORD` secrets in Gitea repository settings. - **CI/CD with Drone** — automated Docker image build and push on Git tags using Drone CI/CD. Each release produces three tags: full version (`0.2.0`), minor version (`0.2`), and `latest`. Configure `REGISTRY_USERNAME` and `REGISTRY_PASSWORD` secrets in Gitea repository settings.
- **Docker build optimization** — added `.dockerignore` to exclude unnecessary files from the build context, reducing build time and image size. - **Docker build optimization** — added `.dockerignore` to exclude unnecessary files from the build context, reducing build time and image size.
- **Release documentation** — added detailed release process guide in `docs/DEVELOPMENT.md` with Semantic Versioning workflow. - **Release documentation** — added detailed release process guide in `docs/DEVELOPMENT.md` with Semantic Versioning workflow.
+1 -1
View File
@@ -5,7 +5,7 @@
**A self-hosted, browser-based system monitoring dashboard powered by Angular and Spring Boot.** **A self-hosted, browser-based system monitoring dashboard powered by Angular and Spring Boot.**
htop-web packages its Angular frontend and Spring Boot WebFlux backend into a single Docker container, providing a web interface for viewing system metrics and process information. htop-web packages its Angular frontend and Spring Boot WebFlux backend into a single Docker container, providing a web interface for viewing system metrics and process information.
<p align="center"> <p align="center">
<img alt="Java 21" src="https://img.shields.io/badge/Java-21-orange?logo=openjdk&logoColor=white"> <img alt="Java 21" src="https://img.shields.io/badge/Java-21-orange?logo=openjdk&logoColor=white">
<img alt="Spring Boot" src="https://img.shields.io/badge/Spring%20Boot-WebFlux-6DB33F?logo=springboot&logoColor=white"> <img alt="Spring Boot" src="https://img.shields.io/badge/Spring%20Boot-WebFlux-6DB33F?logo=springboot&logoColor=white">
+77 -5
View File
@@ -95,8 +95,80 @@ docker run -d \
### Prerequisites ### Prerequisites
- Gitea Actions runner must be configured and running. - Drone CI/CD runner must be configured and running.
- Repository secrets `REGISTRY_USERNAME` and `REGISTRY_PASSWORD` must be set in **Settings → Secrets** of the Gitea repository. These credentials are used to authenticate with the Gitea Container Registry. - Gitea Container Registry must be enabled on the server.
- Repository secrets `REGISTRY_USERNAME` and `REGISTRY_PASSWORD` must be set in the Gitea repository.
### Enabling Container Registry on Gitea server
Container Registry is a built-in feature of Gitea 1.17+. It is **not** configured through the web admin panel — it is enabled via the `app.ini` configuration file on the server.
**1. Find `app.ini` on your server.** The location depends on your installation method:
| Installation | Path to `app.ini` |
|--------------|-------------------|
| Docker (official image) | `/data/gitea/conf/app.ini` inside the container |
| System package (APT/YUM) | `/etc/gitea/app.ini` |
| Manual binary install | `<working-dir>/custom/conf/app.ini` |
You can also find the path from Gitea web interface: **Site Administration → Configuration Summary** — look for `CustomConf` value.
**2. Edit `app.ini`** and add the `[packages]` section:
```ini
[packages]
ENABLED = true
```
If the `[packages]` section already exists, make sure `ENABLED = true`.
**3. Restart Gitea** to apply the changes:
```bash
# Docker
docker compose restart gitea
# System service
sudo systemctl restart gitea
```
**4. Verify** that the registry is working by visiting `https://gitea.jambotron.com/user/packages` — you should see a "Packages" tab.
### Configuring Drone CI/CD
The repository uses **Drone** for CI/CD. The configuration file `.drone.yml` is already included in the repository.
**1. Enable Drone for the repository.**
In Gitea, open the repository and go to **Settings → Drone**. Enable Drone CI/CD for the repository.
**2. Configure Drone secrets.**
In Gitea, open the repository and go to **Settings → Secrets** (or **Variables and Secrets → Secrets**). Add two secrets:
**First secret:**
- **Name:** `REGISTRY_USERNAME`
- **Value:** `Liosha84` (your Gitea username)
**Second secret:**
- **Name:** `REGISTRY_PASSWORD`
- **Value:** paste the Access Token with `write:package` and `read:package` scopes.
### Creating an Access Token for CI/CD
The CI/CD workflow cannot use your account password. You need a Personal Access Token with package permissions:
1. Log in to Gitea as `Liosha84`.
2. Go to **Settings** (your avatar → Settings).
3. In the left menu: **Applications → Manage Access Tokens**.
4. You'll see the section: *"These tokens grant access to your account using the Gitea API."*
5. Click **Generate token**.
6. Fill in:
- **Token name:** `ci-docker-push`
- **Expiration:** select **No expiration** (or set a date, but you'll need to update the secret later).
- **Scopes:** check **`write:package`** and **`read:package`**.
7. Click **Generate**.
8. **Copy the token** — it will be shown only once! Save it securely.
### Creating a release ### Creating a release
@@ -117,10 +189,10 @@ docker run -d \
git push origin v0.2.0 git push origin v0.2.0
``` ```
4. **Gitea Actions** will automatically: 4. **Drone** will automatically:
- Build the Docker image using the multi-stage Dockerfile - Build the Docker image using the multi-stage Dockerfile
- Tag it with the version (`0.2.0`), minor version (`0.2`), and `latest` - Auto-tag it using Semantic Versioning: `v0.2.0` produces tags `0.2`, `0.2.0`
- Push all three tags to the Gitea Container Registry - Push all tags to the Gitea Container Registry
### Docker image tags ### Docker image tags