Compare commits

...

2 Commits

Author SHA1 Message Date
Damir Mukimov
f3e6e9d44a
feat: switch to containerd-native CI/CD with buildah
Some checks failed
CI/CD Pipeline / backend-lint (push) Failing after 31s
CI/CD Pipeline / backend-build (push) Has been skipped
CI/CD Pipeline / frontend-lint (push) Successful in 1m38s
CI/CD Pipeline / frontend-build (push) Failing after 25s
CI/CD Pipeline / e2e-test (push) Has been skipped
- Replace Docker-based CI/CD with buildah for containerd compatibility
- Remove Docker-in-Docker setup from Gitea runner deployment
- Use buildah/podman which work natively with containerd runtime
- Install buildah and podman in runner container during startup
- Maintain Harbor registry integration and caching capabilities

Benefits:
- Native containerd compatibility (no Docker daemon needed)
- Lighter resource usage (no DinD overhead)
- Better integration with K3s containerd runtime
- Same Harbor registry functionality with cleaner architecture
2025-12-25 16:13:58 +01:00
Damir Mukimov
7b467ab7c8
fix: install Docker CLI in CI/CD pipeline
- Add Docker CLI installation to frontend-build and backend-build jobs
- Gitea runner uses minimal image without Docker CLI pre-installed
- Docker daemon is available via DinD but CLI needs to be installed
- Fixes 'Unable to locate executable file: docker' error

This resolves the CI/CD build failures by ensuring Docker CLI is available
for the docker/build-push-action to work properly.
2025-12-25 16:12:52 +01:00
2 changed files with 33 additions and 61 deletions

View File

@ -42,25 +42,22 @@ jobs:
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Harbor
uses: docker/login-action@v3
with:
registry: registry.bk.glpx.pro
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push frontend
uses: docker/build-push-action@v5
with:
context: bugulma/frontend
file: bugulma/frontend/Dockerfile
push: true
tags: |
registry.bk.glpx.pro/turash/turash-frontend:latest
registry.bk.glpx.pro/turash/turash-frontend:${{ gitea.sha }}
cache-from: type=registry,ref=registry.bk.glpx.pro/turash/turash-frontend:buildcache
cache-to: type=registry,ref=registry.bk.glpx.pro/turash/turash-frontend:buildcache,mode=max
- name: Install buildah and podman
run: |
apt-get update
apt-get install -y buildah podman
- name: Log in to Harbor with buildah
run: |
buildah login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }} registry.bk.glpx.pro
- name: Build and push frontend with buildah
run: |
buildah build \
--tag registry.bk.glpx.pro/turash/turash-frontend:latest \
--tag registry.bk.glpx.pro/turash/turash-frontend:${{ gitea.sha }} \
--file bugulma/frontend/Dockerfile \
bugulma/frontend
buildah push registry.bk.glpx.pro/turash/turash-frontend:latest
buildah push registry.bk.glpx.pro/turash/turash-frontend:${{ gitea.sha }}
backend-lint:
runs-on: ubuntu-latest
@ -95,25 +92,22 @@ jobs:
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Harbor
uses: docker/login-action@v3
with:
registry: registry.bk.glpx.pro
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push backend
uses: docker/build-push-action@v5
with:
context: bugulma/backend
file: bugulma/backend/Dockerfile
push: true
tags: |
registry.bk.glpx.pro/turash/turash-backend:latest
registry.bk.glpx.pro/turash/turash-backend:${{ gitea.sha }}
cache-from: type=registry,ref=registry.bk.glpx.pro/turash/turash-backend:buildcache
cache-to: type=registry,ref=registry.bk.glpx.pro/turash/turash-backend:buildcache,mode=max
- name: Install buildah and podman
run: |
apt-get update
apt-get install -y buildah podman
- name: Log in to Harbor with buildah
run: |
buildah login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }} registry.bk.glpx.pro
- name: Build and push backend with buildah
run: |
buildah build \
--tag registry.bk.glpx.pro/turash/turash-backend:latest \
--tag registry.bk.glpx.pro/turash/turash-backend:${{ gitea.sha }} \
--file bugulma/backend/Dockerfile \
bugulma/backend
buildah push registry.bk.glpx.pro/turash/turash-backend:latest
buildah push registry.bk.glpx.pro/turash/turash-backend:${{ gitea.sha }}
e2e-test:
runs-on: ubuntu-latest

View File

@ -16,26 +16,13 @@ spec:
app: gitea-runner
spec:
containers:
- name: docker-daemon
image: docker:dind
env:
- name: DOCKER_TLS_CERTDIR
value: ""
securityContext:
privileged: true
volumeMounts:
- name: docker-graph-storage
mountPath: /var/lib/docker
- name: docker-config
mountPath: /root/.docker/
readOnly: true
- name: runner
image: gitea/act_runner:latest
command:
- sh
- -c
- |
apk add --no-cache nodejs npm || true
apk add --no-cache nodejs npm buildah podman || true
cd /data
if [ ! -f .runner ]; then
/usr/local/bin/act_runner register --instance "$GITEA_INSTANCE_URL" --token "$GITEA_RUNNER_REGISTRATION_TOKEN" --name "$GITEA_RUNNER_NAME" --labels "$GITEA_RUNNER_LABELS" --no-interactive || true
@ -55,15 +42,11 @@ spec:
fieldPath: metadata.name
- name: GITEA_RUNNER_LABELS
value: "ubuntu-latest:host,ubuntu-22.04:host,ubuntu-20.04:host"
- name: DOCKER_HOST
value: "tcp://localhost:2375"
- name: ACT_RUNNER_CONFIG
value: "/data/.runner_config.yaml"
volumeMounts:
- name: runner-data
mountPath: /data
- name: docker-graph-storage
mountPath: /var/lib/docker
- name: runner-config
mountPath: /data/.runner_config.yaml
subPath: config.yaml
@ -77,12 +60,7 @@ spec:
volumes:
- name: runner-data
emptyDir: {}
- name: docker-graph-storage
emptyDir: {}
- name: runner-config
configMap:
name: gitea-runner-config
- name: docker-config
configMap:
name: docker-config
dnsPolicy: ClusterFirst