fix
Some checks failed
CD Preprod / Backend — Lint (push) Successful in 10m27s
CD Preprod / Frontend — Lint & Type-check (push) Successful in 10m59s
CD Preprod / Backend — Unit Tests (push) Successful in 10m8s
CD Preprod / Frontend — Unit Tests (push) Successful in 10m32s
CD Preprod / Backend — Integration Tests (push) Successful in 9m57s
CD Preprod / Build Frontend (push) Successful in 33s
CD Preprod / Build Backend (push) Successful in 53s
CD Preprod / Build Log Exporter (push) Successful in 1m16s
CD Preprod / Deploy to Preprod (push) Failing after 1s
CD Preprod / Smoke Tests (push) Has been skipped
CD Preprod / Notify Success (push) Has been skipped
CD Preprod / Notify Failure (push) Has been skipped
Some checks failed
CD Preprod / Backend — Lint (push) Successful in 10m27s
CD Preprod / Frontend — Lint & Type-check (push) Successful in 10m59s
CD Preprod / Backend — Unit Tests (push) Successful in 10m8s
CD Preprod / Frontend — Unit Tests (push) Successful in 10m32s
CD Preprod / Backend — Integration Tests (push) Successful in 9m57s
CD Preprod / Build Frontend (push) Successful in 33s
CD Preprod / Build Backend (push) Successful in 53s
CD Preprod / Build Log Exporter (push) Successful in 1m16s
CD Preprod / Deploy to Preprod (push) Failing after 1s
CD Preprod / Smoke Tests (push) Has been skipped
CD Preprod / Notify Success (push) Has been skipped
CD Preprod / Notify Failure (push) Has been skipped
This commit is contained in:
parent
72141c5f68
commit
850c23c164
45
.github/workflows/cd-preprod.yml
vendored
45
.github/workflows/cd-preprod.yml
vendored
@ -217,22 +217,61 @@ jobs:
|
||||
NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }}
|
||||
NEXT_PUBLIC_APP_URL=${{ secrets.NEXT_PUBLIC_APP_URL }}
|
||||
|
||||
build-log-exporter:
|
||||
name: Build Log Exporter
|
||||
runs-on: ubuntu-latest
|
||||
needs: integration-tests
|
||||
outputs:
|
||||
sha: ${{ steps.sha.outputs.short }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Short SHA
|
||||
id: sha
|
||||
run: echo "short=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: nologin
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
- uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./apps/log-exporter
|
||||
file: ./apps/log-exporter/Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/xpeditis-log-exporter:preprod
|
||||
${{ env.REGISTRY }}/xpeditis-log-exporter:preprod-${{ steps.sha.outputs.short }}
|
||||
cache-from: type=registry,ref=${{ env.REGISTRY }}/xpeditis-log-exporter:buildcache
|
||||
cache-to: type=registry,ref=${{ env.REGISTRY }}/xpeditis-log-exporter:buildcache,mode=max
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
||||
# ── 5. Deploy via Portainer ──────────────────────────────────────────
|
||||
deploy:
|
||||
name: Deploy to Preprod
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-backend, build-frontend]
|
||||
needs: [build-backend, build-frontend, build-log-exporter]
|
||||
environment: preprod
|
||||
steps:
|
||||
- name: Deploy backend
|
||||
run: |
|
||||
curl -sf -X POST "${{ secrets.PORTAINER_WEBHOOK_BACKEND }}"
|
||||
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST "${{ secrets.PORTAINER_WEBHOOK_BACKEND }}")
|
||||
echo "Portainer response: HTTP $HTTP_CODE"
|
||||
if [[ "$HTTP_CODE" != "2"* ]]; then
|
||||
echo "ERROR: Portainer webhook failed with HTTP $HTTP_CODE"
|
||||
exit 1
|
||||
fi
|
||||
echo "Backend webhook triggered."
|
||||
- name: Wait for backend startup
|
||||
run: sleep 20
|
||||
- name: Deploy frontend
|
||||
run: |
|
||||
curl -sf -X POST "${{ secrets.PORTAINER_WEBHOOK_FRONTEND }}"
|
||||
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST "${{ secrets.PORTAINER_WEBHOOK_FRONTEND }}")
|
||||
echo "Portainer response: HTTP $HTTP_CODE"
|
||||
if [[ "$HTTP_CODE" != "2"* ]]; then
|
||||
echo "ERROR: Portainer webhook failed with HTTP $HTTP_CODE"
|
||||
exit 1
|
||||
fi
|
||||
echo "Frontend webhook triggered."
|
||||
|
||||
# ── 6. Smoke Tests ───────────────────────────────────────────────────
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -44,6 +44,8 @@ lerna-debug.log*
|
||||
|
||||
# Docker
|
||||
docker-compose.override.yml
|
||||
stack-portainer.yaml
|
||||
tmp.stack-portainer.yaml
|
||||
|
||||
# Uploads
|
||||
uploads/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user