Compare commits

..

2 Commits

Author SHA1 Message Date
ucef 6ea793de87 ci(gitea): séparation des pipelines test et prod en deux fichiers distincts
AS Talange CI/CD Pipeline / Build & Run Unit Tests (push) Successful in 3m4s
AS Talange CI/CD Pipeline / Deploy to Test Environment (push) Successful in 4m59s
AS Talange CI/CD Pipeline - Production / Build & Run Unit Tests (push) Successful in 2m28s
AS Talange CI/CD Pipeline - Production / Deploy to Prod Environment (push) Successful in 2m41s
2026-06-23 01:16:59 +02:00
ucef 60257f4823 feat(ui): ajout du logo sur la page de connexion 2026-06-23 01:05:55 +02:00
3 changed files with 59 additions and 28 deletions
@@ -1,15 +1,14 @@
name: AS Talange CI/CD Pipeline name: AS Talange CI/CD Pipeline - Production
on: on:
push: push:
branches: branches:
- main
- 'prod/*' - 'prod/*'
jobs: jobs:
test: test:
name: Build & Run Unit Tests name: Build & Run Unit Tests
runs-on: [self-hosted, ubuntu-latest] runs-on: [self-hosted, prod]
container: container:
image: maven:3.9.6-eclipse-temurin-21 image: maven:3.9.6-eclipse-temurin-21
steps: steps:
@@ -27,32 +26,7 @@ jobs:
- name: Run Maven Tests - name: Run Maven Tests
run: mvn clean test run: mvn clean test
deploy_test:
name: Deploy to Test Environment
needs: test
if: github.ref == 'refs/heads/main'
runs-on: [self-hosted, ubuntu-latest]
container:
image: docker:latest
steps:
- name: Clone repository
run: |
apk add --no-cache git
SERVER_URL="${{ github.server_url }}"
SERVER_NO_PROTO="${SERVER_URL#http://}"
SERVER_NO_PROTO="${SERVER_NO_PROTO#https://}"
git clone --depth 1 "https://oauth2:${{ secrets.GITHUB_TOKEN }}@${SERVER_NO_PROTO}/${{ github.repository }}.git" .
git checkout ${{ github.sha }}
- name: Deploy with Docker Compose
env:
DB_USER: ${{ secrets.DB_USER }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
run: |
echo "POSTGRES_USER=${DB_USER:-myuser}" > .env
echo "POSTGRES_PASSWORD=${DB_PASSWORD:-mypassword}" >> .env
docker compose down app || true
docker compose up -d --build app
deploy_prod: deploy_prod:
name: Deploy to Prod Environment name: Deploy to Prod Environment
+56
View File
@@ -0,0 +1,56 @@
name: AS Talange CI/CD Pipeline
on:
push:
branches:
- main
jobs:
test:
name: Build & Run Unit Tests
runs-on: [self-hosted, ubuntu-latest]
container:
image: maven:3.9.6-eclipse-temurin-21
steps:
- name: Clone repository
run: |
if ! command -v git &> /dev/null; then
apt-get update && apt-get install -y git
fi
SERVER_URL="${{ github.server_url }}"
SERVER_NO_PROTO="${SERVER_URL#http://}"
SERVER_NO_PROTO="${SERVER_NO_PROTO#https://}"
git clone --depth 1 "https://oauth2:${{ secrets.GITHUB_TOKEN }}@${SERVER_NO_PROTO}/${{ github.repository }}.git" .
git checkout ${{ github.sha }}
- name: Run Maven Tests
run: mvn clean test
deploy_test:
name: Deploy to Test Environment
needs: test
if: github.ref == 'refs/heads/main'
runs-on: [self-hosted, ubuntu-latest]
container:
image: docker:latest
steps:
- name: Clone repository
run: |
apk add --no-cache git
SERVER_URL="${{ github.server_url }}"
SERVER_NO_PROTO="${SERVER_URL#http://}"
SERVER_NO_PROTO="${SERVER_NO_PROTO#https://}"
git clone --depth 1 "https://oauth2:${{ secrets.GITHUB_TOKEN }}@${SERVER_NO_PROTO}/${{ github.repository }}.git" .
git checkout ${{ github.sha }}
- name: Deploy with Docker Compose
env:
DB_USER: ${{ secrets.DB_USER }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
run: |
echo "POSTGRES_USER=${DB_USER:-myuser}" > .env
echo "POSTGRES_PASSWORD=${DB_PASSWORD:-mypassword}" >> .env
docker compose down app || true
docker compose up -d --build app
@@ -14,6 +14,7 @@
<div class="bg-white p-8 rounded-2xl shadow-xl w-full max-w-md border border-gray-100"> <div class="bg-white p-8 rounded-2xl shadow-xl w-full max-w-md border border-gray-100">
<div class="text-center mb-8"> <div class="text-center mb-8">
<img src="/images/logo.png" alt="Logo AS Talange" class="h-24 w-auto mx-auto mb-4 object-contain drop-shadow-sm">
<h1 class="text-3xl font-bold text-gray-900 mb-2">AS Talange</h1> <h1 class="text-3xl font-bold text-gray-900 mb-2">AS Talange</h1>
<p class="text-gray-500">Outil de gestion administrative</p> <p class="text-gray-500">Outil de gestion administrative</p>
</div> </div>