Merge pull request #373 from meysamhadeli/fix/fix-ci

fix: fix ci failed
This commit is contained in:
Meysam Hadeli 2026-02-24 22:56:10 +03:30 committed by GitHub
commit a882b3cfe2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 35 additions and 24 deletions

View File

@ -6,6 +6,10 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="all" Version="1.1.118">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

View File

@ -8,7 +8,7 @@ COPY ./Directory.Build.props ./
# Setup working directory for the project
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./building-blocks/
COPY ./src/ApiGateway/src/ApiGateway.csproj ./src/ApiGateway/src/
COPY ./src/Aspire/src/ServiceDefaults/ServiceDefaults.csproj ./src/Aspire/src/ServiceDefaults/
# Restore nuget packages
RUN dotnet restore ./src/ApiGateway/src/ApiGateway.csproj
@ -16,6 +16,7 @@ RUN dotnet restore ./src/ApiGateway/src/ApiGateway.csproj
# Copy project files
COPY ./src/BuildingBlocks ./src/BuildingBlocks/
COPY ./src/ApiGateway/src ./src/ApiGateway/src/
COPY ./src/Aspire/src/ServiceDefaults/ ./src/Aspire/src/ServiceDefaults/
# Build project with Release configuration
# and no restore, as we did it already

View File

@ -15,18 +15,18 @@ public static class Extensions
builder.Services.AddServiceDiscovery();
builder.Services.ConfigureHttpClientDefaults(http =>
{
http.AddStandardResilienceHandler(options =>
{
var timeSpan = TimeSpan.FromMinutes(1);
options.CircuitBreaker.SamplingDuration = timeSpan * 2;
options.TotalRequestTimeout.Timeout = timeSpan * 3;
options.Retry.MaxRetryAttempts = 3;
});
{
http.AddStandardResilienceHandler(options =>
{
var timeSpan = TimeSpan.FromMinutes(1);
options.CircuitBreaker.SamplingDuration = timeSpan * 2;
options.TotalRequestTimeout.Timeout = timeSpan * 3;
options.Retry.MaxRetryAttempts = 3;
});
// Turn on service discovery by default
http.AddServiceDiscovery();
});
// Turn on service discovery by default
http.AddServiceDiscovery();
});
return builder;
}
@ -38,4 +38,4 @@ public static class Extensions
return app;
}
}
}

View File

@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\BuildingBlocks\BuildingBlocks.csproj" />
<ProjectReference Include="..\..\..\BuildingBlocks\BuildingBlocks.csproj" IsAspireProjectResource="false" />
</ItemGroup>
</Project>

View File

@ -9,7 +9,7 @@ COPY ./Directory.Build.props ./
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./src/BuildingBlocks/
COPY ./src/Services/Booking/src/Booking/Booking.csproj ./src/Services/Booking/src/Booking/
COPY ./src/Services/Booking/src/Booking.Api/Booking.Api.csproj ./src/Services/Booking/src/Booking.Api/
COPY ./src/Aspire/src/ServiceDefaults/ServiceDefaults.csproj ./src/Aspire/src/ServiceDefaults/
# Restore nuget packages
RUN dotnet restore ./src/Services/Booking/src/Booking.Api/Booking.Api.csproj
@ -18,6 +18,7 @@ RUN dotnet restore ./src/Services/Booking/src/Booking.Api/Booking.Api.csproj
COPY ./src/BuildingBlocks ./src/BuildingBlocks/
COPY ./src/Services/Booking/src/Booking/ ./src/Services/Booking/src/Booking/
COPY ./src/Services/Booking/src/Booking.Api/ ./src/Services/Booking/src/Booking.Api/
COPY ./src/Aspire/src/ServiceDefaults/ ./src/Aspire/src/ServiceDefaults/
# Build project with Release configuration
# and no restore, as we did it already

View File

@ -9,7 +9,7 @@ COPY ./Directory.Build.props ./
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./src/BuildingBlocks/
COPY ./src/Services/Booking/src/Booking/Booking.csproj ./src/Services/Booking/src/Booking/
COPY ./src/Services/Booking/src/Booking.Api/Booking.Api.csproj ./src/Services/Booking/src/Booking.Api/
COPY ./src/Aspire/src/ServiceDefaults/ServiceDefaults.csproj ./src/Aspire/src/ServiceDefaults/
# Restore nuget packages
RUN --mount=type=cache,id=booking_nuget,target=/root/.nuget/packages \
@ -19,6 +19,7 @@ RUN --mount=type=cache,id=booking_nuget,target=/root/.nuget/packages \
COPY ./src/BuildingBlocks ./src/BuildingBlocks/
COPY ./src/Services/Booking/src/Booking/ ./src/Services/Booking/src/Booking/
COPY ./src/Services/Booking/src/Booking.Api/ ./src/Services/Booking/src/Booking.Api/
COPY ./src/Aspire/src/ServiceDefaults/ ./src/Aspire/src/ServiceDefaults/
# Build project with Release configuration
# and no restore, as we did it already

View File

@ -9,7 +9,7 @@ COPY ./Directory.Build.props ./
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./src/BuildingBlocks/
COPY ./src/Services/Flight/src/Flight/Flight.csproj ./src/Services/Flight/src/Flight/
COPY ./src/Services/Flight/src/Flight.Api/Flight.Api.csproj ./src/Services/Flight/src/Flight.Api/
COPY ./src/Aspire/src/ServiceDefaults/ServiceDefaults.csproj ./src/Aspire/src/ServiceDefaults/
# Restore nuget packages
RUN dotnet restore ./src/Services/Flight/src/Flight.Api/Flight.Api.csproj
@ -18,6 +18,7 @@ RUN dotnet restore ./src/Services/Flight/src/Flight.Api/Flight.Api.csproj
COPY ./src/BuildingBlocks ./src/BuildingBlocks/
COPY ./src/Services/Flight/src/Flight/ ./src/Services/Flight/src/Flight/
COPY ./src/Services/Flight/src/Flight.Api/ ./src/Services/Flight/src/Flight.Api/
COPY ./src/Aspire/src/ServiceDefaults/ ./src/Aspire/src/ServiceDefaults/
# Build project with Release configuration
# and no restore, as we did it already

View File

@ -9,7 +9,7 @@ COPY ./Directory.Build.props ./
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./src/BuildingBlocks/
COPY ./src/Services/Flight/src/Flight/Flight.csproj ./src/Services/Flight/src/Flight/
COPY ./src/Services/Flight/src/Flight.Api/Flight.Api.csproj ./src/Services/Flight/src/Flight.Api/
COPY ./src/Aspire/src/ServiceDefaults/ServiceDefaults.csproj ./src/Aspire/src/ServiceDefaults/
# Restore nuget packages
RUN --mount=type=cache,id=flight_nuget,target=/root/.nuget/packages \
@ -19,6 +19,7 @@ RUN --mount=type=cache,id=flight_nuget,target=/root/.nuget/packages \
COPY ./src/BuildingBlocks ./src/BuildingBlocks/
COPY ./src/Services/Flight/src/Flight/ ./src/Services/Flight/src/Flight/
COPY ./src/Services/Flight/src/Flight.Api/ ./src/Services/Flight/src/Flight.Api/
COPY ./src/Aspire/src/ServiceDefaults/ ./src/Aspire/src/ServiceDefaults/
# Build project with Release configuration
# and no restore, as we did it already

View File

@ -10,6 +10,7 @@ COPY ./Directory.Build.props ./
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./src/BuildingBlocks/
COPY ./src/Services/Identity/src/Identity/Identity.csproj ./src/Services/Identity/src/Identity/
COPY ./src/Services/Identity/src/Identity.Api/Identity.Api.csproj ./src/Services/Identity/src/Identity.Api/
COPY ./src/Aspire/src/ServiceDefaults/ServiceDefaults.csproj ./src/Aspire/src/ServiceDefaults/
# Restore nuget packages
RUN dotnet restore ./src/Services/Identity/src/Identity.Api/Identity.Api.csproj
@ -18,6 +19,7 @@ RUN dotnet restore ./src/Services/Identity/src/Identity.Api/Identity.Api.csproj
COPY ./src/BuildingBlocks ./src/BuildingBlocks/
COPY ./src/Services/Identity/src/Identity/ ./src/Services/Identity/src/Identity/
COPY ./src/Services/Identity/src/Identity.Api/ ./src/Services/Identity/src/Identity.Api/
COPY ./src/Aspire/src/ServiceDefaults/ ./src/Aspire/src/ServiceDefaults/
# Build project with Release configuration
# and no restore, as we did it already

View File

@ -10,6 +10,7 @@ COPY ./Directory.Build.props ./
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./src/BuildingBlocks/
COPY ./src/Services/Identity/src/Identity/Identity.csproj ./src/Services/Identity/src/Identity/
COPY ./src/Services/Identity/src/Identity.Api/Identity.Api.csproj ./src/Services/Identity/src/Identity.Api/
COPY ./src/Aspire/src/ServiceDefaults/ServiceDefaults.csproj ./src/Aspire/src/ServiceDefaults/
# Restore nuget packages
RUN --mount=type=cache,id=identity_nuget,target=/root/.nuget/packages \
@ -19,6 +20,7 @@ RUN --mount=type=cache,id=identity_nuget,target=/root/.nuget/packages \
COPY ./src/BuildingBlocks ./src/BuildingBlocks/
COPY ./src/Services/Identity/src/Identity/ ./src/Services/Identity/src/Identity/
COPY ./src/Services/Identity/src/Identity.Api/ ./src/Services/Identity/src/Identity.Api/
COPY ./src/Aspire/src/ServiceDefaults/ ./src/Aspire/src/ServiceDefaults/
# Build project with Release configuration
# and no restore, as we did it already

View File

@ -7,10 +7,6 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Data\Migrations" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Aspire\src\ServiceDefaults\ServiceDefaults.csproj" />
<ProjectReference Include="..\..\..\..\BuildingBlocks\BuildingBlocks.csproj" />

View File

@ -9,7 +9,7 @@ COPY ./Directory.Build.props ./
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./src/BuildingBlocks/
COPY ./src/Services/Passenger/src/Passenger/Passenger.csproj ./src/Services/Passenger/src/Passenger/
COPY ./src/Services/Passenger/src/Passenger.Api/Passenger.Api.csproj ./src/Services/Passenger/src/Passenger.Api/
COPY ./src/Aspire/src/ServiceDefaults/ServiceDefaults.csproj ./src/Aspire/src/ServiceDefaults/
# Restore nuget packages
RUN dotnet restore ./src/Services/Passenger/src/Passenger.Api/Passenger.Api.csproj
@ -18,6 +18,7 @@ RUN dotnet restore ./src/Services/Passenger/src/Passenger.Api/Passenger.Api.cspr
COPY ./src/BuildingBlocks ./src/BuildingBlocks/
COPY ./src/Services/Passenger/src/Passenger/ ./src/Services/Passenger/src/Passenger/
COPY ./src/Services/Passenger/src/Passenger.Api/ ./src/Services/Passenger/src/Passenger.Api/
COPY ./src/Aspire/src/ServiceDefaults/ ./src/Aspire/src/ServiceDefaults/
# Build project with Release configuration
# and no restore, as we did it already

View File

@ -9,7 +9,7 @@ COPY ./Directory.Build.props ./
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./src/BuildingBlocks/
COPY ./src/Services/Passenger/src/Passenger/Passenger.csproj ./src/Services/Passenger/src/Passenger/
COPY ./src/Services/Passenger/src/Passenger.Api/Passenger.Api.csproj ./src/Services/Passenger/src/Passenger.Api/
COPY ./src/Aspire/src/ServiceDefaults/ServiceDefaults.csproj ./src/Aspire/src/ServiceDefaults/
# Restore nuget packages
RUN --mount=type=cache,id=passenger_nuget,target=/root/.nuget/packages \
@ -19,6 +19,7 @@ RUN --mount=type=cache,id=passenger_nuget,target=/root/.nuget/packages \
COPY ./src/BuildingBlocks ./src/BuildingBlocks/
COPY ./src/Services/Passenger/src/Passenger/ ./src/Services/Passenger/src/Passenger/
COPY ./src/Services/Passenger/src/Passenger.Api/ ./src/Services/Passenger/src/Passenger.Api/
COPY ./src/Aspire/src/ServiceDefaults/ ./src/Aspire/src/ServiceDefaults/
# Build project with Release configuration
# and no restore, as we did it already