Compare commits

..

2 Commits

Author SHA1 Message Date
Damir Mukimov
b4715361cd
feat: Add Gitea Actions workflow for CI/CD
All checks were successful
CI/CD Pipeline / frontend-lint (push) Has been skipped
CI/CD Pipeline / backend-lint (push) Has been skipped
CI/CD Pipeline / backend-build (push) Has been skipped
CI/CD Pipeline / frontend-build (push) Has been skipped
CI/CD Pipeline / e2e-test (push) Has been skipped
- Convert from Woodpecker CI to Gitea Actions
- Remove Kubernetes deployment (ArgoCD handles CD)
- Configure Harbor registry integration
- Add lint, test, build, and push steps for frontend and backend
- E2E tests after builds complete
2025-12-24 20:58:26 +01:00
Damir Mukimov
911c6f1a99
chore: Update ArgoCD applications to use Gitea repository 2025-12-24 20:43:58 +01:00
3 changed files with 134 additions and 2 deletions

132
.gitea/workflows/ci.yml Normal file
View File

@ -0,0 +1,132 @@
name: CI/CD Pipeline
on:
push:
branches:
- master
paths:
- 'bugulma/**'
- 'k8s/**'
- '.gitea/workflows/**'
pull_request:
branches:
- master
paths:
- 'bugulma/**'
- 'k8s/**'
jobs:
frontend-lint:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' || contains(github.event.head_commit.modified, 'bugulma/frontend') || contains(github.event.head_commit.added, 'bugulma/frontend')
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'yarn'
cache-dependency-path: bugulma/frontend/yarn.lock
- name: Install dependencies
working-directory: bugulma/frontend
run: yarn install --frozen-lockfile
- name: Lint
working-directory: bugulma/frontend
run: yarn lint
- name: Test
working-directory: bugulma/frontend
run: yarn test --run
frontend-build:
runs-on: ubuntu-latest
needs: frontend-lint
if: github.event_name == 'push' && github.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:${{ github.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
backend-lint:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' || contains(github.event.head_commit.modified, 'bugulma/backend') || contains(github.event.head_commit.added, 'bugulma/backend')
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Download dependencies
working-directory: bugulma/backend
run: go mod download
- name: Vet
working-directory: bugulma/backend
run: go vet ./...
- name: Test
working-directory: bugulma/backend
run: go test -v -race -coverprofile=coverage.out ./...
- name: Coverage
working-directory: bugulma/backend
run: go tool cover -html=coverage.out -o coverage.html
backend-build:
runs-on: ubuntu-latest
needs: backend-lint
if: github.event_name == 'push' && github.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:${{ github.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
e2e-test:
runs-on: ubuntu-latest
needs: [frontend-build, backend-build]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'yarn'
cache-dependency-path: bugulma/frontend/yarn.lock
- name: Install dependencies
working-directory: bugulma/frontend
run: yarn install --frozen-lockfile
- name: Run E2E tests
working-directory: bugulma/frontend
run: yarn test:e2e --headed=false

View File

@ -11,7 +11,7 @@ metadata:
spec: spec:
project: default project: default
source: source:
repoURL: https://github.com/SamyRai/turash.git repoURL: https://gitea.bk.glpx.pro/mukimovd/turash.git
targetRevision: master targetRevision: master
path: k8s path: k8s
kustomize: {} kustomize: {}

View File

@ -11,7 +11,7 @@ metadata:
spec: spec:
project: default project: default
source: source:
repoURL: https://github.com/SamyRai/turash.git repoURL: https://gitea.bk.glpx.pro/mukimovd/turash.git
targetRevision: master targetRevision: master
path: k8s path: k8s
kustomize: {} kustomize: {}