ci: migration vers une architecture de pipeline basée sur des conteneurs dédiés
AS Talange CI/CD Pipeline / Build & Run Unit Tests (push) Successful in 2m57s
AS Talange CI/CD Pipeline / Build & Run in Docker Container (push) Failing after 2m35s

This commit is contained in:
2026-05-31 00:54:07 +02:00
parent 5b0edcafef
commit fc81b9e1ac
+13 -7
View File
@@ -9,30 +9,36 @@ jobs:
test:
name: Build & Run Unit Tests
runs-on: self-hosted
container:
image: maven:3.9.6-eclipse-temurin-21
steps:
- name: Clone repository
run: |
# Install git if not present in the maven image
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 in Docker
run: |
docker run --rm \
-v ${{ github.workspace }}:/as-talange \
-w /as-talange \
maven:3.9.6-eclipse-temurin-21 \
mvn clean test
- name: Run Maven Tests
run: mvn clean test
deploy:
name: Build & Run in Docker Container
needs: test
runs-on: self-hosted
container:
image: docker:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
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://}"