Publish dynamic questions during UAT deploy
This commit is contained in:
@@ -4,16 +4,19 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
ARG BUILD_REVISION
|
||||
WORKDIR /src
|
||||
|
||||
COPY ["QuestionsApi.csproj", "./"]
|
||||
RUN dotnet restore "QuestionsApi.csproj"
|
||||
COPY ["api/QuestionsApi/QuestionsApi.csproj", "api/QuestionsApi/"]
|
||||
RUN dotnet restore "api/QuestionsApi/QuestionsApi.csproj"
|
||||
|
||||
COPY . .
|
||||
COPY api/QuestionsApi/ api/QuestionsApi/
|
||||
COPY content/dynamic_questions/ content/dynamic_questions/
|
||||
WORKDIR /src/api/QuestionsApi
|
||||
RUN dotnet publish "QuestionsApi.csproj" -c Release -o /app/publish /p:UseAppHost=false /p:SourceRevisionId=${BUILD_REVISION}
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
|
||||
ARG BUILD_REVISION
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/publish .
|
||||
COPY --from=build /src/content/dynamic_questions ./content/dynamic_questions
|
||||
|
||||
ENV ASPNETCORE_URLS=http://+:5008 \
|
||||
ASPNETCORE_ENVIRONMENT=Production \
|
||||
|
||||
@@ -12,7 +12,7 @@ public static class DynamicBlueprintCommand
|
||||
var sourceIndex = Array.FindIndex(args, value => value.Equals("--source", StringComparison.OrdinalIgnoreCase));
|
||||
var source = sourceIndex >= 0 && sourceIndex + 1 < args.Length
|
||||
? args[sourceIndex + 1]
|
||||
: Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "..", "..", "..", "..", "..", "content", "dynamic_questions"));
|
||||
: Path.Combine(AppContext.BaseDirectory, "content", "dynamic_questions");
|
||||
if (!Directory.Exists(source))
|
||||
{
|
||||
await output.WriteLineAsync($"Dynamic blueprint directory not found: {source}");
|
||||
|
||||
Reference in New Issue
Block a user