mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
feat: switch to Kaniko for containerd-native CI/CD
Some checks failed
CI/CD Pipeline / frontend-build (push) Failing after 47s
CI/CD Pipeline / e2e-test (push) Has been skipped
CI/CD Pipeline / backend-lint (push) Failing after 30s
CI/CD Pipeline / backend-build (push) Has been skipped
CI/CD Pipeline / frontend-lint (push) Successful in 1m41s
Some checks failed
CI/CD Pipeline / frontend-build (push) Failing after 47s
CI/CD Pipeline / e2e-test (push) Has been skipped
CI/CD Pipeline / backend-lint (push) Failing after 30s
CI/CD Pipeline / backend-build (push) Has been skipped
CI/CD Pipeline / frontend-lint (push) Successful in 1m41s
- Replace buildah with Kaniko for optimal containerd compatibility - Kaniko is specifically designed for building in Kubernetes/containerd environments - No package installation needed - Kaniko runs in its own container - Maintains Harbor registry integration and caching capabilities - Simplifies runner deployment by removing package management Benefits: - Native containerd support (no Docker daemon needed) - No package installation in CI runners - Optimized for Kubernetes environments - Same Harbor registry functionality with cleaner architecture - Better resource usage than DinD approach
This commit is contained in:
parent
f3e6e9d44a
commit
60848459f3
@ -42,22 +42,16 @@ jobs:
|
|||||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install buildah and podman
|
- name: Build and push frontend with Kaniko
|
||||||
run: |
|
uses: aevea/action-kaniko@master
|
||||||
apt-get update
|
with:
|
||||||
apt-get install -y buildah podman
|
registry: registry.bk.glpx.pro
|
||||||
- name: Log in to Harbor with buildah
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
run: |
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
buildah login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }} registry.bk.glpx.pro
|
image: turash/turash-frontend
|
||||||
- name: Build and push frontend with buildah
|
tag: latest,${{ gitea.sha }}
|
||||||
run: |
|
cache: true
|
||||||
buildah build \
|
cache_registry: registry.bk.glpx.pro/turash/turash-frontend
|
||||||
--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:
|
backend-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -92,22 +86,16 @@ jobs:
|
|||||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install buildah and podman
|
- name: Build and push backend with Kaniko
|
||||||
run: |
|
uses: aevea/action-kaniko@master
|
||||||
apt-get update
|
with:
|
||||||
apt-get install -y buildah podman
|
registry: registry.bk.glpx.pro
|
||||||
- name: Log in to Harbor with buildah
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
run: |
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
buildah login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }} registry.bk.glpx.pro
|
image: turash/turash-backend
|
||||||
- name: Build and push backend with buildah
|
tag: latest,${{ gitea.sha }}
|
||||||
run: |
|
cache: true
|
||||||
buildah build \
|
cache_registry: registry.bk.glpx.pro/turash/turash-backend
|
||||||
--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:
|
e2e-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@ -22,7 +22,7 @@ spec:
|
|||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
apk add --no-cache nodejs npm buildah podman || true
|
apk add --no-cache nodejs npm || true
|
||||||
cd /data
|
cd /data
|
||||||
if [ ! -f .runner ]; then
|
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
|
/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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user