[FA-11] More pipeline fixes
Some checks failed
Build Gateway / build-subgraphs (map[name:novel-service project:FictionArchive.Service.NovelService subgraph:Novel]) (pull_request) Has been cancelled
Build Gateway / build-subgraphs (map[name:scheduler-service project:FictionArchive.Service.SchedulerService subgraph:Scheduler]) (pull_request) Has been cancelled
Build Gateway / build-subgraphs (map[name:translation-service project:FictionArchive.Service.TranslationService subgraph:Translation]) (pull_request) Has been cancelled
Build Gateway / build-subgraphs (map[name:user-service project:FictionArchive.Service.UserService subgraph:User]) (pull_request) Has been cancelled
Build Gateway / build-gateway (pull_request) Has been cancelled
Build Gateway / build-subgraphs (map[name:file-service project:FictionArchive.Service.FileService subgraph:File]) (pull_request) Has been cancelled
CI / build-frontend (pull_request) Has been cancelled
CI / build-backend (pull_request) Has been cancelled
Release / build-and-push (map[dockerfile:FictionArchive.Service.AuthenticationService/Dockerfile name:authentication-service]) (pull_request) Has been cancelled
Release / build-and-push (map[dockerfile:FictionArchive.Service.FileService/Dockerfile name:file-service]) (pull_request) Has been cancelled
Release / build-and-push (map[dockerfile:FictionArchive.Service.NovelService/Dockerfile name:novel-service]) (pull_request) Has been cancelled
Release / build-and-push (map[dockerfile:FictionArchive.Service.SchedulerService/Dockerfile name:scheduler-service]) (pull_request) Has been cancelled
Release / build-and-push (map[dockerfile:FictionArchive.Service.TranslationService/Dockerfile name:translation-service]) (pull_request) Has been cancelled
Release / build-and-push (map[dockerfile:FictionArchive.Service.UserService/Dockerfile name:user-service]) (pull_request) Has been cancelled
Release / build-frontend (pull_request) Has been cancelled
Release / build-and-push (map[dockerfile:FictionArchive.API/Dockerfile name:api]) (pull_request) Has been cancelled
Some checks failed
Build Gateway / build-subgraphs (map[name:novel-service project:FictionArchive.Service.NovelService subgraph:Novel]) (pull_request) Has been cancelled
Build Gateway / build-subgraphs (map[name:scheduler-service project:FictionArchive.Service.SchedulerService subgraph:Scheduler]) (pull_request) Has been cancelled
Build Gateway / build-subgraphs (map[name:translation-service project:FictionArchive.Service.TranslationService subgraph:Translation]) (pull_request) Has been cancelled
Build Gateway / build-subgraphs (map[name:user-service project:FictionArchive.Service.UserService subgraph:User]) (pull_request) Has been cancelled
Build Gateway / build-gateway (pull_request) Has been cancelled
Build Gateway / build-subgraphs (map[name:file-service project:FictionArchive.Service.FileService subgraph:File]) (pull_request) Has been cancelled
CI / build-frontend (pull_request) Has been cancelled
CI / build-backend (pull_request) Has been cancelled
Release / build-and-push (map[dockerfile:FictionArchive.Service.AuthenticationService/Dockerfile name:authentication-service]) (pull_request) Has been cancelled
Release / build-and-push (map[dockerfile:FictionArchive.Service.FileService/Dockerfile name:file-service]) (pull_request) Has been cancelled
Release / build-and-push (map[dockerfile:FictionArchive.Service.NovelService/Dockerfile name:novel-service]) (pull_request) Has been cancelled
Release / build-and-push (map[dockerfile:FictionArchive.Service.SchedulerService/Dockerfile name:scheduler-service]) (pull_request) Has been cancelled
Release / build-and-push (map[dockerfile:FictionArchive.Service.TranslationService/Dockerfile name:translation-service]) (pull_request) Has been cancelled
Release / build-and-push (map[dockerfile:FictionArchive.Service.UserService/Dockerfile name:user-service]) (pull_request) Has been cancelled
Release / build-frontend (pull_request) Has been cancelled
Release / build-and-push (map[dockerfile:FictionArchive.API/Dockerfile name:api]) (pull_request) Has been cancelled
This commit is contained in:
@@ -6,11 +6,17 @@ on:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'FictionArchive.Service.*/**'
|
||||
- 'FictionArchive.Common/**'
|
||||
- 'FictionArchive.Service.Shared/**'
|
||||
- 'FictionArchive.API/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'FictionArchive.Service.*/**'
|
||||
- 'FictionArchive.Common/**'
|
||||
- 'FictionArchive.Service.Shared/**'
|
||||
- 'FictionArchive.API/**'
|
||||
|
||||
env:
|
||||
@@ -18,8 +24,63 @@ env:
|
||||
IMAGE_NAME: ${{ gitea.repository_owner }}/fictionarchive-api
|
||||
|
||||
jobs:
|
||||
build-subgraphs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
service:
|
||||
- name: novel-service
|
||||
project: FictionArchive.Service.NovelService
|
||||
subgraph: Novel
|
||||
- name: translation-service
|
||||
project: FictionArchive.Service.TranslationService
|
||||
subgraph: Translation
|
||||
- name: scheduler-service
|
||||
project: FictionArchive.Service.SchedulerService
|
||||
subgraph: Scheduler
|
||||
- name: user-service
|
||||
project: FictionArchive.Service.UserService
|
||||
subgraph: User
|
||||
- name: file-service
|
||||
project: FictionArchive.Service.FileService
|
||||
subgraph: File
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Install Fusion CLI
|
||||
run: dotnet tool install -g HotChocolate.Fusion.CommandLine
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore ${{ matrix.service.project }}/${{ matrix.service.project }}.csproj
|
||||
|
||||
- name: Build
|
||||
run: dotnet build ${{ matrix.service.project }}/${{ matrix.service.project }}.csproj -c Release --no-restore
|
||||
|
||||
- name: Export schema
|
||||
run: |
|
||||
dotnet run -c Release --no-launch-profile \
|
||||
--project ${{ matrix.service.project }}/${{ matrix.service.project }}.csproj \
|
||||
-- schema export --output ${{ matrix.service.project }}/schema.graphql
|
||||
|
||||
- name: Pack subgraph
|
||||
run: fusion subgraph pack -w ${{ matrix.service.project }}
|
||||
|
||||
- name: Upload subgraph package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.service.name }}-subgraph
|
||||
path: ${{ matrix.service.project }}/*.fsp
|
||||
retention-days: 30
|
||||
|
||||
build-gateway:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-subgraphs
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -35,41 +96,35 @@ jobs:
|
||||
- name: Create subgraphs directory
|
||||
run: mkdir -p subgraphs
|
||||
|
||||
# Download all subgraph packages from latest successful builds
|
||||
- name: Download Novel Service subgraph
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: novel-service-subgraph
|
||||
path: subgraphs/novel
|
||||
continue-on-error: true
|
||||
|
||||
- name: Download Translation Service subgraph
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: translation-service-subgraph
|
||||
path: subgraphs/translation
|
||||
continue-on-error: true
|
||||
|
||||
- name: Download Scheduler Service subgraph
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: scheduler-service-subgraph
|
||||
path: subgraphs/scheduler
|
||||
continue-on-error: true
|
||||
|
||||
- name: Download User Service subgraph
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: user-service-subgraph
|
||||
path: subgraphs/user
|
||||
continue-on-error: true
|
||||
|
||||
- name: Download File Service subgraph
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: file-service-subgraph
|
||||
path: subgraphs/file
|
||||
continue-on-error: true
|
||||
|
||||
- name: Configure subgraph URLs for Docker
|
||||
run: |
|
||||
@@ -107,6 +162,10 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Extract registry hostname
|
||||
id: registry
|
||||
run: echo "HOST=$(echo '${{ gitea.server_url }}' | sed 's|https\?://||')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
@@ -121,7 +180,7 @@ jobs:
|
||||
file: FictionArchive.API/Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ gitea.sha }}
|
||||
${{ steps.registry.outputs.HOST }}/${{ env.IMAGE_NAME }}:latest
|
||||
${{ steps.registry.outputs.HOST }}/${{ env.IMAGE_NAME }}:${{ gitea.sha }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
name: Build Subgraphs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'FictionArchive.Service.*/**'
|
||||
- 'FictionArchive.Common/**'
|
||||
- 'FictionArchive.Service.Shared/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'FictionArchive.Service.*/**'
|
||||
- 'FictionArchive.Common/**'
|
||||
- 'FictionArchive.Service.Shared/**'
|
||||
|
||||
jobs:
|
||||
build-subgraphs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
service:
|
||||
- name: novel-service
|
||||
project: FictionArchive.Service.NovelService
|
||||
subgraph: Novel
|
||||
- name: translation-service
|
||||
project: FictionArchive.Service.TranslationService
|
||||
subgraph: Translation
|
||||
- name: scheduler-service
|
||||
project: FictionArchive.Service.SchedulerService
|
||||
subgraph: Scheduler
|
||||
- name: user-service
|
||||
project: FictionArchive.Service.UserService
|
||||
subgraph: User
|
||||
- name: file-service
|
||||
project: FictionArchive.Service.FileService
|
||||
subgraph: File
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Install Fusion CLI
|
||||
run: dotnet tool install -g HotChocolate.Fusion.CommandLine
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore ${{ matrix.service.project }}/${{ matrix.service.project }}.csproj
|
||||
|
||||
- name: Build
|
||||
run: dotnet build ${{ matrix.service.project }}/${{ matrix.service.project }}.csproj -c Release --no-restore
|
||||
|
||||
- name: Export schema
|
||||
run: |
|
||||
dotnet run -c Release --no-launch-profile \
|
||||
--project ${{ matrix.service.project }}/${{ matrix.service.project }}.csproj \
|
||||
-- schema export --output ${{ matrix.service.project }}/schema.graphql
|
||||
|
||||
- name: Pack subgraph
|
||||
run: fusion subgraph pack -w ${{ matrix.service.project }}
|
||||
|
||||
- name: Upload subgraph package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.service.name }}-subgraph
|
||||
path: ${{ matrix.service.project }}/*.fsp
|
||||
retention-days: 30
|
||||
|
||||
# Trigger gateway build after all subgraphs are built
|
||||
trigger-gateway:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-subgraphs
|
||||
steps:
|
||||
- name: Trigger gateway workflow
|
||||
run: |
|
||||
curl -X POST \
|
||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/actions/workflows/build-gateway.yml/dispatches" \
|
||||
-d '{"ref":"master"}'
|
||||
@@ -43,6 +43,10 @@ jobs:
|
||||
id: version
|
||||
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Extract registry hostname
|
||||
id: registry
|
||||
run: echo "HOST=$(echo '${{ gitea.server_url }}' | sed 's|https\?://||')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
@@ -57,8 +61,8 @@ jobs:
|
||||
file: ${{ matrix.service.dockerfile }}
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-${{ matrix.service.name }}:${{ steps.version.outputs.VERSION }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-${{ matrix.service.name }}:latest
|
||||
${{ steps.registry.outputs.HOST }}/${{ env.IMAGE_PREFIX }}-${{ matrix.service.name }}:${{ steps.version.outputs.VERSION }}
|
||||
${{ steps.registry.outputs.HOST }}/${{ env.IMAGE_PREFIX }}-${{ matrix.service.name }}:latest
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
@@ -75,6 +79,10 @@ jobs:
|
||||
id: version
|
||||
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Extract registry hostname
|
||||
id: registry
|
||||
run: echo "HOST=$(echo '${{ gitea.server_url }}' | sed 's|https\?://||')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
@@ -95,7 +103,7 @@ jobs:
|
||||
VITE_OIDC_REDIRECT_URI=${{ vars.VITE_OIDC_REDIRECT_URI }}
|
||||
VITE_OIDC_POST_LOGOUT_REDIRECT_URI=${{ vars.VITE_OIDC_POST_LOGOUT_REDIRECT_URI }}
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-frontend:${{ steps.version.outputs.VERSION }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-frontend:latest
|
||||
${{ steps.registry.outputs.HOST }}/${{ env.IMAGE_PREFIX }}-frontend:${{ steps.version.outputs.VERSION }}
|
||||
${{ steps.registry.outputs.HOST }}/${{ env.IMAGE_PREFIX }}-frontend:latest
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"BaseUrl": "https://localhost:7247/api"
|
||||
},
|
||||
"RabbitMQ": {
|
||||
"ConnectionString": "amqp://localhost",
|
||||
"ConnectionString": "amqp://localhost2",
|
||||
"ClientIdentifier": "FileService"
|
||||
},
|
||||
"S3": {
|
||||
|
||||
Reference in New Issue
Block a user