diff --git a/pipelines/api-pipeline.yml b/pipelines/api-pipeline.yml index c060d792e..bbbcef68f 100644 --- a/pipelines/api-pipeline.yml +++ b/pipelines/api-pipeline.yml @@ -29,6 +29,7 @@ variables: subscriptionServiceProd: 'FRA Automation Prod' deploymentManifest: '$(Pipeline.Workspace)/k8s-deployment/deployment-test-env.yml' fullImageName: $(fusionAcr)/$(imageName) + dbTagPrefix: resources stages: - stage: BuildDockerImage @@ -122,6 +123,7 @@ stages: artifact: 'k8s-deployment' environment: $(envName) azureSubscription: $(subscriptionServiceNonProd) + dbTagPrefix: $(dbTagPrefix) - task: KubernetesManifest@0 displayName: Deploy to Kubernetes cluster @@ -177,6 +179,7 @@ stages: artifact: 'k8s-deployment' environment: $(envName) azureSubscription: $(subscriptionServiceNonProd) + dbTagPrefix: $(dbTagPrefix) - task: KubernetesManifest@0 displayName: Deploy to Kubernetes cluster @@ -232,6 +235,7 @@ stages: artifact: 'k8s-deployment' environment: $(envName) azureSubscription: $(subscriptionServiceProd) + dbTagPrefix: $(dbTagPrefix) - task: KubernetesManifest@0 displayName: Deploy to Kubernetes cluster @@ -296,6 +300,7 @@ stages: environment: $(envName) azureSubscription: $(subscriptionServiceNonProd) + dbTagPrefix: $(dbTagPrefix) - task: KubernetesManifest@0 displayName: Deploy to Kubernetes cluster diff --git a/pipelines/api-pr-pipeline.yml b/pipelines/api-pr-pipeline.yml index 8dcdd6720..6a241b576 100644 --- a/pipelines/api-pr-pipeline.yml +++ b/pipelines/api-pr-pipeline.yml @@ -160,6 +160,7 @@ stages: artifact: 'k8s-deployment' environment: '$(envName)-$(prNumber)' azureSubscription: $(subscriptionService) + dbTagPrefix: resources - task: KubernetesManifest@0 diff --git a/pipelines/pr-cleanup-pipeline.yml b/pipelines/pr-cleanup-pipeline.yml index 3581c1263..3b109edbd 100644 --- a/pipelines/pr-cleanup-pipeline.yml +++ b/pipelines/pr-cleanup-pipeline.yml @@ -42,7 +42,7 @@ jobs: Inline: | $activePRs = "$(activePrs)".Split(",") - $prDbs = Get-AzResource -ResourceType "Microsoft.Sql/servers/databases" -Tag @{"fusion-app-env" = "pr" } -ResourceGroupName Fusion-SQL-Test | Where-Object { $_.Tags["fusion-app"] -eq "resources" } + $prDbs = Get-AzResource -ResourceType "Microsoft.Sql/servers/databases" -Tag @{"fusion-app-env" = "pr" } -ResourceGroupName Fusion-SQL-Test | Where-Object { $_.Tags["fusion-app"] -eq "resources" -or $_.Tags["fusion-app"] -eq "summary" } foreach ($db in $prDbs) { if ($db.Tags["fusion-app-env"] -ne "pr") { diff --git a/pipelines/summary-api-pipeline.yml b/pipelines/summary-api-pipeline.yml new file mode 100644 index 000000000..e897538dc --- /dev/null +++ b/pipelines/summary-api-pipeline.yml @@ -0,0 +1,308 @@ +name: $(date:yyyyMMdd)$(rev:.r) + +pr: none + +trigger: + branches: + include: + - master + paths: + include: + - src/Fusion.Summary.Api/* + +pool: + vmImage: ubuntu-latest + +resources: + repositories: + - repository: infra + name: equinor/fusion-infrastructure + type: github + endpoint: fusion-infrastructure + +variables: + imageTag: $(Build.BuildNumber) + fusionAcr: 'fusioncr.azurecr.io' + imageRepo: fra/fusion-summary-api + imageName: $(imageRepo):$(imageTag) + subscriptionServiceNonProd: 'FRA Automation Non-Prod' + subscriptionServiceProd: 'FRA Automation Prod' + deploymentManifest: '$(Pipeline.Workspace)/k8s-deployment/deployment-test-env.yml' + fullImageName: $(fusionAcr)/$(imageName) + dbTagPrefix: summary + +stages: + - stage: BuildDockerImage + displayName: 'Build docker image' + jobs: + - job: BuildImage + steps: + - task: Docker@2 + displayName: Login to fusioncr + inputs: + command: login + containerRegistry: fusioncr + - template: templates/docker-buildx.yml@infra + parameters: + repository: $(imageRepo) + buildContext: ./src + dockerfile: src/Fusion.Summary.Api/Dockerfile + dockerPush: true + disableCache: true + tags: | + $(imageTag) + - template: templates/docker-buildx.yml@infra + parameters: + initBuilderInstance: false + repository: '' + buildContext: ./src + dockerfile: src/Fusion.Summary.Api/Dockerfile + arguments: | + --target=export + --output=type=local,dest=$(Build.ArtifactStagingDirectory) + --cache-from=type=registry,ref=fusioncachecr.azurecr.io/$(imageRepo):$(imageTag) + + - task: CopyFiles@2 + displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' + inputs: + SourceFolder: 'src/Fusion.Summary.Api/Deployment/k8s' + Contents: | + deployment-test-env.yml + TargetFolder: '$(Build.ArtifactStagingDirectory)' + + - publish: $(Build.ArtifactStagingDirectory) + artifact: 'k8s-deployment' + + - stage: DeployCI + displayName: 'Deploy to CI' + dependsOn: BuildDockerImage + condition: succeeded() + variables: + envName: 'ci' + fusionEnvironment: 'ci' + clientId: '5a842df8-3238-415d-b168-9f16a6a6031b' + + jobs: + - deployment: DeployCI + environment: fusion-ci.fusion-resources-app-ci + strategy: + runOnce: + deploy: + steps: + - task: AzurePowerShell@5 + displayName: 'Get secrets' + inputs: + azureSubscription: $(subscriptionServiceNonProd) + ScriptType: 'InlineScript' + FailOnStandardError: true + azurePowerShellVersion: 'LatestVersion' + Inline: | + $secretText = Get-AzKeyVaultSecret -VaultName kv-fap-resources-ci -Name AzureAd--ClientSecret -AsPlainText + Write-Output "##vso[task.setvariable variable=clientSecret;issecret=true]$($secretText)" + + - template: templates/get-appinsights-key.yml + parameters: + environment: $(envName) + azureSubscription: $(subscriptionServiceNonProd) + + + # Load the key vault url into variable, so it can be used when replacing tokens. + - template: templates/get-keyvault-url.yml + parameters: + environment: $(envName) + variableName: envKeyVaultUrl + azureSubscription: $(subscriptionServiceNonProd) + + + - template: templates/replace-tokens.yml + parameters: + targetFiles: '$(deploymentManifest)' + + - template: templates/execute-sql-migration.yml + parameters: + artifact: 'k8s-deployment' + environment: $(envName) + azureSubscription: $(subscriptionServiceNonProd) + dbTagPrefix: $(dbTagPrefix) + + - task: KubernetesManifest@0 + displayName: Deploy to Kubernetes cluster + inputs: + action: deploy + manifests: $(deploymentManifest) + + - stage: DeployFQA + displayName: 'Deploy to FQA' + dependsOn: DeployCI + condition: succeeded() + variables: + envName: 'fqa' + fusionEnvironment: 'fqa' + clientId: '5a842df8-3238-415d-b168-9f16a6a6031b' + + jobs: + - deployment: DeployFQA + environment: fusion-fqa.fusion-resources-app-fqa + strategy: + runOnce: + deploy: + steps: + - task: AzurePowerShell@5 + displayName: 'Get secrets' + inputs: + azureSubscription: $(subscriptionServiceNonProd) + ScriptType: 'InlineScript' + FailOnStandardError: true + azurePowerShellVersion: 'LatestVersion' + Inline: | + $secretText = Get-AzKeyVaultSecret -VaultName kv-fap-resources-fqa -Name AzureAd--ClientSecret -AsPlainText + Write-Output "##vso[task.setvariable variable=clientSecret;issecret=true]$($secretText)" + + - template: templates/get-appinsights-key.yml + parameters: + environment: $(envName) + azureSubscription: $(subscriptionServiceNonProd) + + # Load the key vault url into variable, so it can be used when replacing tokens. + - template: templates/get-keyvault-url.yml + parameters: + environment: $(envName) + variableName: envKeyVaultUrl + azureSubscription: $(subscriptionServiceNonProd) + + - template: templates/replace-tokens.yml + parameters: + targetFiles: '$(deploymentManifest)' + + - template: templates/execute-sql-migration.yml + parameters: + artifact: 'k8s-deployment' + environment: $(envName) + azureSubscription: $(subscriptionServiceNonProd) + dbTagPrefix: $(dbTagPrefix) + + - task: KubernetesManifest@0 + displayName: Deploy to Kubernetes cluster + inputs: + action: deploy + manifests: $(deploymentManifest) + + - stage: DeployFPRD + displayName: 'Deploy to FPRD' + dependsOn: DeployFQA + condition: succeeded() + variables: + envName: 'fprd' + fusionEnvironment: 'fprd' + clientId: '97978493-9777-4d48-b38a-67b0b9cd88d2' + + jobs: + - deployment: DeployFPRD + environment: fusion-prod.fusion-resources-app-fprd + strategy: + runOnce: + deploy: + steps: + - task: AzurePowerShell@5 + displayName: 'Get secrets' + inputs: + azureSubscription: $(subscriptionServiceProd) + ScriptType: 'InlineScript' + FailOnStandardError: true + azurePowerShellVersion: 'LatestVersion' + Inline: | + $secretText = Get-AzKeyVaultSecret -VaultName kv-fap-resources-fprd -Name AzureAd--ClientSecret -AsPlainText + Write-Output "##vso[task.setvariable variable=clientSecret;issecret=true]$($secretText)" + + - template: templates/get-appinsights-key.yml + parameters: + environment: $(envName) + azureSubscription: $(subscriptionServiceProd) + + # Load the key vault url into variable, so it can be used when replacing tokens. + - template: templates/get-keyvault-url.yml + parameters: + environment: $(envName) + variableName: envKeyVaultUrl + azureSubscription: $(subscriptionServiceProd) + + - template: templates/replace-tokens.yml + parameters: + targetFiles: '$(deploymentManifest)' + + - template: templates/execute-sql-migration.yml + parameters: + artifact: 'k8s-deployment' + environment: $(envName) + azureSubscription: $(subscriptionServiceProd) + dbTagPrefix: $(dbTagPrefix) + + - task: KubernetesManifest@0 + displayName: Deploy to Kubernetes cluster + inputs: + action: deploy + manifests: $(deploymentManifest) + + - template: templates/deploy-container-app.yml + parameters: + azureSubscription: $(subscriptionServiceProd) + environment: $(envName) + fusionEnvironment: $(fusionEnvironment) + clientId: $(clientId) + imageName: $(fullImageName) + + - stage: DeployTR + displayName: 'Deploy to TR' + dependsOn: DeployFPRD + condition: succeeded() + variables: + envName: 'tr' + fusionEnvironment: 'tr' + clientId: '5a842df8-3238-415d-b168-9f16a6a6031b' + + jobs: + - deployment: DeployTR + environment: fusion-tr.fusion-resources-app-tr + strategy: + runOnce: + deploy: + steps: + - task: AzurePowerShell@5 + displayName: 'Get secrets' + inputs: + azureSubscription: $(subscriptionServiceNonProd) + ScriptType: 'InlineScript' + FailOnStandardError: true + azurePowerShellVersion: 'LatestVersion' + Inline: | + $secretText = Get-AzKeyVaultSecret -VaultName kv-fap-resources-tr -Name AzureAd--ClientSecret -AsPlainText + Write-Output "##vso[task.setvariable variable=clientSecret;issecret=true]$($secretText)" + + - template: templates/get-appinsights-key.yml + parameters: + environment: $(envName) + azureSubscription: $(subscriptionServiceNonProd) + + # Load the key vault url into variable, so it can be used when replacing tokens. + - template: templates/get-keyvault-url.yml + parameters: + environment: $(envName) + variableName: envKeyVaultUrl + azureSubscription: $(subscriptionServiceNonProd) + + - template: templates/replace-tokens.yml + parameters: + targetFiles: '$(deploymentManifest)' + + - template: templates/execute-sql-migration.yml + parameters: + artifact: 'k8s-deployment' + environment: $(envName) + azureSubscription: $(subscriptionServiceNonProd) + dbTagPrefix: $(dbTagPrefix) + + - task: KubernetesManifest@0 + displayName: Deploy to Kubernetes cluster + inputs: + action: deploy + manifests: $(deploymentManifest) \ No newline at end of file diff --git a/pipelines/summary-api-pr-pipeline.yml b/pipelines/summary-api-pr-pipeline.yml index 1d54c2616..03007aa36 100644 --- a/pipelines/summary-api-pr-pipeline.yml +++ b/pipelines/summary-api-pr-pipeline.yml @@ -22,7 +22,8 @@ variables: fusionAcr: 'fusioncr.azurecr.io' imageRepo: resources/fusion-summary-api imageName: $(imageRepo):$(prNumber) - subscriptionService: 'PROJECT_PORTAL (63b791ae-b2bc-41a1-ac66-806c4e69bffe)' + subscriptionService: 'FRA Automation Non-Prod' + subscriptionServiceCore: PROJECT_PORTAL (63b791ae-b2bc-41a1-ac66-806c4e69bffe) deploymentManifest: '$(Pipeline.Workspace)/k8s-deployment/deployment-pr-env.yml' fullImageName: $(fusionAcr)/$(imageName) buildNr: $(Build.BuildNumber) @@ -45,6 +46,7 @@ stages: inputs: command: login containerRegistry: fusioncachecr + - template: templates/docker-buildx.yml@infra parameters: repository: $(imageRepo) @@ -58,6 +60,17 @@ stages: tags: | $(prNumber) + - template: templates/docker-buildx.yml@infra + parameters: + initBuilderInstance: false + repository: '' + buildContext: ./src + dockerfile: src/Fusion.Summary.Api/Dockerfile + arguments: | + --target=export + --output=type=local,dest=$(Build.ArtifactStagingDirectory) + --cache-from=type=registry,ref=fusioncachecr.azurecr.io/$(imageRepo):$(prNumber) + - task: CopyFiles@2 displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' inputs: @@ -80,14 +93,14 @@ stages: jobs: - deployment: DeployPR displayName: 'Deploy API to PR' - environment: fusion-summary-pr.fusion-summary-app-pr + environment: fra-pr.fusion-resources-app-pr strategy: runOnce: deploy: steps: - template: templates/install-fusion-ps.yml - - task: AzurePowerShell@4 + - task: AzurePowerShell@5 displayName: 'Get secrets' inputs: azureSubscription: $(subscriptionService) @@ -98,6 +111,39 @@ stages: $secretText = Get-AzKeyVaultSecret -VaultName kv-fap-resources-pr -Name AzureAd--ClientSecret -AsPlainText Write-Output "##vso[task.setvariable variable=clientSecret;issecret=true]$($secretText)" + ## MUST RUN THIS AS THE CORE SERVICE PRINCIPAL, UNTILL NEW DB DEPLOY IS ESTABLISHED + - task: AzurePowerShell@5 + displayName: 'Provision database' + inputs: + azureSubscription: $(subscriptionServiceCore) + ScriptType: 'InlineScript' + FailOnStandardError: true + azurePowerShellVersion: 'LatestVersion' + Inline: | + Import-Module FusionPS + + $dbName = "sqldb-fapp-fra-summary-db-PR-$(prNumber)" + $tags = @{ + "pr" = "$(prNumber)" + "fusion-app-component-id" = "summary-api-db-pr-$(prNumber)" + "fusion-app" = "summary" + "fusion-app-env" = "pr" + } + + New-FusionSqlDatabaseV2 ` + -InfraEnv Test ` + -DatabaseName $dbName ` + -SourceDatabase sqldb-fapp-fra-summary-db-CI ` + -Tags $tags + + Set-FusionAzSqlDatabaseAccess ` + -InfraEnv Test ` + -Environment PR ` + -DatabaseName $dbName + + $connectionString = Get-FusionSqlServerConnectionString -InfraEnv Test -DatabaseName $dbName + Write-Output "##vso[task.setvariable variable=dbConnectionString]$($connectionString)" + - template: templates/get-appinsights-key.yml parameters: environment: $(envName) @@ -111,6 +157,13 @@ stages: - template: templates/replace-tokens.yml parameters: targetFiles: '$(deploymentManifest)' + + - template: templates/execute-sql-migration.yml + parameters: + artifact: 'k8s-deployment' + environment: '$(envName)-$(prNumber)' + azureSubscription: $(subscriptionService) + dbTagPrefix: 'summary' - task: KubernetesManifest@0 displayName: Deploy to Kubernetes cluster diff --git a/pipelines/templates/execute-sql-migration.yml b/pipelines/templates/execute-sql-migration.yml index faa3fa3f9..21d868f2b 100644 --- a/pipelines/templates/execute-sql-migration.yml +++ b/pipelines/templates/execute-sql-migration.yml @@ -3,6 +3,7 @@ parameters: sqlFile: '' artifact: 'drop' environment: '' + dbTagPrefix: '' steps: # - task: DownloadPipelineArtifact@2 @@ -24,12 +25,17 @@ steps: if (-not [string]::IsNullOrEmpty($overrideFileName)) { $sqlFile = $overrideFileName } + + $dbTagPrefix = "${{ parameters.dbTagPrefix }}" + if ($dbTagPrefix -eq '') { + throw "dbTagPrefix is required" + } ## Use access token to access database - the service principal should be located in the sql server admin group. $context = [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile.DefaultContext $token = [Microsoft.Azure.Commands.Common.Authentication.AzureSession]::Instance.AuthenticationFactory.Authenticate($context.Account, $context.Environment, $context.Tenant.Id.ToString(), $null, [Microsoft.Azure.Commands.Common.Authentication.ShowDialog]::Never, $null, "https://database.windows.net/") - $dbResource = Get-AzResource -TagName fusion-app-component-id -TagValue "resources-api-db-${{ parameters.environment }}" | select -First 1 + $dbResource = Get-AzResource -TagName fusion-app-component-id -TagValue "${{ parameters.dbTagPrefix }}-api-db-${{ parameters.environment }}" | select -First 1 $db = Get-AzSqlDatabase -DatabaseName $dbResource.Name.Split("/")[1] -ResourceGroupName $dbResource.ResourceGroupName -ServerName $dbResource.Name.Split("/")[0] $sqlServer = Get-AzSqlServer -ServerName $db.ServerName -ResourceGroupName $db.ResourceGroupName diff --git a/src/Fusion.Summary.Api/Deployment/k8s/deployment-pr-env.yml b/src/Fusion.Summary.Api/Deployment/k8s/deployment-pr-env.yml index cf72a9a77..211f25610 100644 --- a/src/Fusion.Summary.Api/Deployment/k8s/deployment-pr-env.yml +++ b/src/Fusion.Summary.Api/Deployment/k8s/deployment-pr-env.yml @@ -65,7 +65,9 @@ spec: - name: AzureAd__ClientId value: "{{clientId}}" - name: BuildNr - value: "{{buildNr}}" + value: "{{buildNr}}" + - name: PULL_REQUEST_ID + value: "{{prNumber}}" args: - /server diff --git a/src/Fusion.Summary.Api/Deployment/k8s/deployment-test-env.yml b/src/Fusion.Summary.Api/Deployment/k8s/deployment-test-env.yml index 91ce7ba24..4eaebd2c9 100644 --- a/src/Fusion.Summary.Api/Deployment/k8s/deployment-test-env.yml +++ b/src/Fusion.Summary.Api/Deployment/k8s/deployment-test-env.yml @@ -17,7 +17,7 @@ stringData: apiVersion: apps/v1 kind: Deployment metadata: - name: resources-api + name: summary-api spec: replicas: 1 strategy: @@ -27,11 +27,11 @@ spec: maxUnavailable: 50% selector: matchLabels: - app: resources-api + app: summary-api template: metadata: labels: - app: resources-api + app: summary-api spec: volumes: - name: env-secrets-volumes @@ -39,7 +39,7 @@ spec: secretName: env-secrets containers: - - name: resources-api + - name: summary-api image: {{fusionAcr}}/{{imageName}} ports: - containerPort: 80 @@ -70,7 +70,7 @@ spec: livenessProbe: httpGet: path: /_health/liveness - port: 80 + port: 8080 failureThreshold: 10 timeoutSeconds: 30 initialDelaySeconds: 60 @@ -78,8 +78,8 @@ spec: readinessProbe: httpGet: - path: /_health/ready - port: 80 + path: /_health/readiness + port: 8080 initialDelaySeconds: 10 timeoutSeconds: 30 periodSeconds: 30 @@ -87,19 +87,19 @@ spec: kind: Service apiVersion: v1 metadata: - name: resources-api + name: summary-api spec: selector: - app: resources-api + app: summary-api ports: - port: 80 - targetPort: 80 + targetPort: 8080 --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: resources-api-fusion-ingress + name: summary-api-fusion-ingress annotations: kubernetes.io/tls-acme: "true" kubernetes.io/ingress.class: nginx @@ -112,16 +112,16 @@ metadata: spec: tls: - hosts: - - resources-api.{{ENVNAME}}.fusion-dev.net + - summary-api.{{ENVNAME}}.fusion-dev.net secretName: {{ENVNAME}}.fusion-dev.net-tls rules: - - host: resources-api.{{ENVNAME}}.fusion-dev.net + - host: summary-api.{{ENVNAME}}.fusion-dev.net http: paths: - path: / pathType: Prefix backend: service: - name: resources-api + name: summary-api port: number: 80 \ No newline at end of file diff --git a/src/Fusion.Summary.Api/Dockerfile b/src/Fusion.Summary.Api/Dockerfile index 912d038da..2ed4fa748 100644 --- a/src/Fusion.Summary.Api/Dockerfile +++ b/src/Fusion.Summary.Api/Dockerfile @@ -17,10 +17,21 @@ WORKDIR "/src/Fusion.Summary.Api" RUN dotnet build "./Fusion.Summary.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build FROM build AS publish + +## Set an variable to indicate build +ENV IS_DOCKER_BUILD=true + ARG BUILD_CONFIGURATION=Release -RUN dotnet publish "./Fusion.Summary.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false +RUN dotnet tool install --global dotnet-ef +ENV PATH="$PATH:/root/.dotnet/tools" +RUN dotnet publish "./Fusion.Summary.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish +RUN dotnet ef migrations script --idempotent --output "/migrations/migration.sql" --configuration Release --no-build + +FROM scratch as export +COPY --from=publish /migrations/migration.sql db-migration.sql FROM base AS final WORKDIR /app COPY --from=publish /app/publish . +COPY --from=publish /migrations . ENTRYPOINT ["dotnet", "Fusion.Summary.Api.dll"] \ No newline at end of file diff --git a/src/Fusion.Summary.Api/Program.cs b/src/Fusion.Summary.Api/Program.cs index 5f3858339..4a7192148 100644 --- a/src/Fusion.Summary.Api/Program.cs +++ b/src/Fusion.Summary.Api/Program.cs @@ -34,9 +34,7 @@ builder.Services.AddEndpointsApiExplorer(); builder.Services.AddHealthChecks() .AddCheck("liveness", () => HealthCheckResult.Healthy()) - .AddCheck("db", () => HealthCheckResult.Healthy(), tags: ["ready"]); -// TODO: Add a real health check, when database is added in deployment pipelines and PR pipelines -// .AddDbContextCheck("db", tags: new[] { "ready" }); + .AddDbContextCheck("db", tags: new[] { "ready" }); builder.Services .AddAuthentication(JwtBearerDefaults.AuthenticationScheme) @@ -72,7 +70,7 @@ }); builder.Services.AddApplicationInsightsTelemetry(); -builder.Services.AddSqlDbContext(databaseConnectionString, enablePullRequestEnv: false) +builder.Services.AddSqlDbContext(databaseConnectionString) .AddSqlTokenProvider() .AddAccessTokenSupport(); builder.Services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(Assembly.GetExecutingAssembly())); @@ -117,7 +115,7 @@ app.Run(); /// -/// For testing +/// For testing. /// public partial class Program { diff --git a/src/backend/api/Fusion.Resources.Api/Startup.cs b/src/backend/api/Fusion.Resources.Api/Startup.cs index 10b72aa24..e7b22b035 100644 --- a/src/backend/api/Fusion.Resources.Api/Startup.cs +++ b/src/backend/api/Fusion.Resources.Api/Startup.cs @@ -182,7 +182,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseDeveloperExceptionPage(); } - //app.UseMiddleware(); + //app.UseMiddleware(); app.UseMiddleware(); app.UseMiddleware();