Skip to content

Commit

Permalink
Merge pull request #673 from DFE-Digital/feature/193795-remove-person…
Browse files Browse the repository at this point in the history
…s-api

Removed PersonsApi logic
  • Loading branch information
DrizzlyOwl authored Jan 20, 2025
2 parents f1742d1 + 968d0ce commit 8090c61
Show file tree
Hide file tree
Showing 96 changed files with 34 additions and 5,014 deletions.
44 changes: 16 additions & 28 deletions .github/workflows/build-and-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,38 +54,26 @@ jobs:
needs: [ set-env ]
uses: DFE-Digital/deploy-azure-container-apps-action/.github/workflows/[email protected]
strategy:
matrix:
image: [
"Dockerfile",
"Dockerfile.PersonsApi"
]
stage: [
"final"
]
include:
- image: "Dockerfile"
aca_name: "ACA_CONTAINERAPP_NAME"
prefix: ""
name: "tramsapi-app"

- image: "Dockerfile"
aca_name: "ACA_CONTAINERAPP_NAME"
prefix: "init-"
name: "tramsapi-app"
stage: initcontainer

- image: "Dockerfile.PersonsApi"
aca_name: "ACA_CONTAINERAPP_PERSONS_API_NAME"
prefix: "persons-api-"
name: "personsapi-app"
matrix:
image: [
"Dockerfile"
]
stage: [
"final",
"initcontainer"
]
include:
- stage: "final"
prefix: ""
- stage: "initcontainer"
prefix: "init-"
with:
docker-image-name: '${{ matrix.name }}'
docker-image-name: 'tramsapi-app'
docker-build-file-name: './${{ matrix.image }}'
docker-build-target: ${{ matrix.stage }}
docker-tag-prefix: ${{ matrix.prefix }}
environment: ${{ needs.set-env.outputs.environment }}
# Only annotate the release once, because both apps are deployed at the same time
annotate-release: ${{ matrix.name == 'tramsapi-app' && matrix.stage == 'final' }}
annotate-release: ${{ matrix.stage == 'final' }}
import-without-deploy: ${{ matrix.stage == 'initcontainer' }}
docker-build-args: |
COMMIT_SHA="${{ needs.set-env.outputs.checked-out-sha }}"
Expand All @@ -96,7 +84,7 @@ jobs:
azure-acr-client-id: ${{ secrets.ACR_CLIENT_ID }}
azure-acr-name: ${{ secrets.ACR_NAME }}
azure-aca-client-id: ${{ secrets.ACA_CLIENT_ID }}
azure-aca-name: ${{ secrets[matrix.aca_name] }}
azure-aca-name: ${{ secrets.ACA_CONTAINERAPP_NAME }}
azure-aca-resource-group: ${{ secrets.ACA_RESOURCE_GROUP }}

create-tag:
Expand Down
88 changes: 0 additions & 88 deletions .github/workflows/build-and-push-package.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/workflows/continuous-integration-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on:
- 'Dfe.Academies.*/**'
- 'TramsDataApi/**'
- 'TramsDataApi.*/**'
- 'PersonsApi/**'
- 'PersonsApi.*/**'
- '!Dfe.Academies.Performance/**'
pull_request:
branches: [ main ]
Expand All @@ -18,8 +16,6 @@ on:
- 'Dfe.Academies.*/**'
- 'TramsDataApi/**'
- 'TramsDataApi.*/**'
- 'PersonsApi/**'
- 'PersonsApi.*/**'
- '!Dfe.Academies.Performance/**'

env:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/continuous-integration-javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ jobs:
lint:
runs-on: ubuntu-latest
defaults:
working-directory: CypressTests
run:
working-directory: CypressTests
steps:
- name: checkout code
uses: actions/checkout@v4

- name: lint cypress tests
run: |
npm ci
npm run lint
npm run lint
8 changes: 2 additions & 6 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
pull_request:
paths:
- Dockerfile
- Dockerfile.PersonsApi
types: [opened, synchronize]

jobs:
Expand All @@ -14,14 +13,11 @@ jobs:
matrix:
image: [
"Dockerfile",
"Dockerfile.PersonsApi"
]
stage: [
"final"
"final",
"initcontainer"
]
include:
- image: "Dockerfile"
stage: "initcontainer"
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@ jobs:
matrix:
image: [
"Dockerfile",
"Dockerfile.PersonsApi"
]
stage: [
"final"
"final",
"initcontainer"
]
include:
- image: "Dockerfile"
stage: "initcontainer"
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
using Dfe.Academies.Application.Common.Interfaces;
using Dfe.Academies.Domain.Constituencies;
using Dfe.Academies.Domain.Interfaces.Repositories;
using Dfe.Academies.Infrastructure;
using Dfe.Academies.Infrastructure.Repositories;
using Dfe.Academies.Infrastructure.Security.Authorization;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Dfe.Academies.Domain.Interfaces.Repositories;
using Dfe.Academies.Infrastructure.QueryServices;
using Dfe.Academies.Domain.ValueObjects;

namespace Microsoft.Extensions.DependencyInjection
{
Expand Down Expand Up @@ -39,41 +34,6 @@ public static IServiceCollection AddInfrastructureDependencyGroup(
return services;
}

public static IServiceCollection AddPersonsApiInfrastructureDependencyGroup(
this IServiceCollection services, IConfiguration config)
{
//Repos
services.AddScoped<ITrustRepository, TrustRepository>();
services.AddScoped<IEstablishmentRepository, EstablishmentRepository>();
services.AddScoped<IConstituencyRepository, ConstituencyRepository>();

// Query Services
services.AddScoped<IEstablishmentQueryService, EstablishmentQueryService>();
services.AddScoped<ITrustQueryService, TrustQueryService>();

//Cache service
services.AddServiceCaching(config);

//Db
var connectionString = config.GetConnectionString("DefaultConnection");

services.AddDbContext<MstrContext>(options =>
options.UseSqlServer(connectionString));

services.AddDbContext<MopContext>(options =>
options.UseSqlServer(connectionString));

services.AddDbContext<MisMstrContext>(options =>
options.UseSqlServer(connectionString));

AddInfrastructureHealthChecks(services);

// Authentication
services.AddCustomAuthorization(config);

return services;
}

public static void AddInfrastructureHealthChecks(this IServiceCollection services) {
services.AddHealthChecks()
.AddDbContextCheck<MstrContext>("Academies Database");
Expand Down
85 changes: 0 additions & 85 deletions Dfe.Academies.Api.Infrastructure/MopContext.cs

This file was deleted.

This file was deleted.

Loading

0 comments on commit 8090c61

Please sign in to comment.