Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
906a987
feat: adidng the new ReceiveServiceNowMessage fucnton
SamRobinson75684 Feb 11, 2025
dd0db24
chore: namespace change
SamRobinson75684 Feb 11, 2025
596e442
chore: removing commented out code
SamRobinson75684 Feb 11, 2025
00b5ed7
chore: trying to get code to build in git pipeline
SamRobinson75684 Feb 11, 2025
779ca38
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 Feb 11, 2025
076af17
chore: removing unneeded .vscode folder
SamRobinson75684 Feb 12, 2025
13cb4a3
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 Feb 12, 2025
9ab8e71
chore: adding docker details for new function
SamRobinson75684 Feb 12, 2025
7c22f9f
feat: DTOSS-7351 infra setup for ServiceNow function app
MacMur85 Feb 12, 2025
692f6e6
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 Feb 13, 2025
b0a59f7
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 Feb 13, 2025
a395f00
chnaging CohortDistributionDataServiceURL port number to be correct
SamRobinson75684 Feb 13, 2025
4fe0c8a
chore: adding line space to line 434 in compose.core.yaml
SamRobinson75684 Feb 13, 2025
e7f399e
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 Feb 17, 2025
edefe5c
chore: linting in the compose core yaml
SamRobinson75684 Feb 17, 2025
2a10bf3
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 Mar 24, 2025
7550c6a
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 Mar 24, 2025
70d4846
fix: fixng docker file
SamRobinson75684 Mar 24, 2025
bda4e36
fix: fixng docker file
SamRobinson75684 Mar 24, 2025
a69691b
tring to get function to build
SamRobinson75684 Mar 24, 2025
d52a860
fix: trying to fix docker file
SamRobinson75684 Mar 24, 2025
f39f1db
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 Mar 24, 2025
5c70525
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 Mar 24, 2025
4d3be45
fix: fixing unit tests after merge
SamRobinson75684 Mar 24, 2025
53b721f
chore: addresing comments
SamRobinson75684 Mar 24, 2025
177285e
chore: addresing comments
SamRobinson75684 Mar 24, 2025
e26e05b
chore: addresing comments
SamRobinson75684 Mar 24, 2025
ea781e2
chore: addressing comments
SamRobinson75684 Mar 24, 2025
bdc1acc
Merge branch 'main' into feat/DTOSS-7351-adding-new-ReceiveServiceNow…
SamRobinson75684 Mar 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion application/CohortManager/compose.cohort-distribution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ services:
- LookupValidationURL=http://localhost:7075/api/LookupValidation
- ExceptionFunctionURL=http://localhost:7070/api/CreateException
- DtOsDatabaseConnectionString=Server=localhost,1433;Database=${DB_NAME};User Id=SA;Password=${PASSWORD};TrustServerCertificate=True
- CohortDistributionDataServiceURL=http://localhost:7915/api/CohortDistributionDataService/
- CohortDistributionDataServiceURL=http://localhost:7992/api/CohortDistributionDataService/

remove-validation-exception-data:
container_name: remove-validation-exception-data
Expand Down
10 changes: 9 additions & 1 deletion application/CohortManager/compose.core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ services:
environment:
- ASPNETCORE_URLS=http://*:7911
- DtOsDatabaseConnectionString=Server=localhost,1433;Database=${DB_NAME};User Id=SA;Password=${PASSWORD};TrustServerCertificate=True

bs-request-audit-data-service:
container_name: bs-request-audit-data-service
network_mode: host
Expand All @@ -431,3 +431,11 @@ services:
environment:
- ASPNETCORE_URLS=http://*:8996
- DtOsDatabaseConnectionString=Server=localhost,1433;Database=${DB_NAME};User Id=SA;Password=${PASSWORD};TrustServerCertificate=True
receive-service-now-message:
Comment thread
SamRobinson75684 marked this conversation as resolved.
Outdated
container_name: receive-service-now-message
Comment thread
SamRobinson75684 marked this conversation as resolved.
network_mode: host
build:
context: ./src/Functions/
dockerfile: ServiceNowIntegrationService/Dockerfile
environment:
- ASPNETCORE_URLS=http://*:7912
6 changes: 6 additions & 0 deletions application/CohortManager/src/Functions/Functions.sln
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UpdateParticipantFromScreen
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CheckParticipantExistsTests", "..\..\..\..\tests\UnitTests\ParticipantManagementServicesTests\CheckParticipantExistsTests\CheckParticipantExistsTests.csproj", "{A7B76A57-0B18-4234-BAE5-1F9178CB6A08}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReceiveServiceNowMessage", "ServiceNowIntegrationService\ReceiveServiceNowMessage.csproj", "{43A1A7D7-83F5-448E-8ADA-741284819DCB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BsSelectRequestAuditDataService", "screeningDataServices\BsSelectRequestAudit\BsSelectRequestAuditDataService.csproj", "{8AA0B06E-A160-4949-9419-421C4DFEE441}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utilities", "Shared\Utilities\Utilities.csproj", "{5B584F73-BBF4-4E7A-A9F5-E02FD7E83E5C}"
Expand Down Expand Up @@ -536,6 +538,10 @@ Global
{A7B76A57-0B18-4234-BAE5-1F9178CB6A08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7B76A57-0B18-4234-BAE5-1F9178CB6A08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7B76A57-0B18-4234-BAE5-1F9178CB6A08}.Release|Any CPU.Build.0 = Release|Any CPU
{43A1A7D7-83F5-448E-8ADA-741284819DCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{43A1A7D7-83F5-448E-8ADA-741284819DCB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{43A1A7D7-83F5-448E-8ADA-741284819DCB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{43A1A7D7-83F5-448E-8ADA-741284819DCB}.Release|Any CPU.Build.0 = Release|Any CPU
{8AA0B06E-A160-4949-9419-421C4DFEE441}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8AA0B06E-A160-4949-9419-421C4DFEE441}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8AA0B06E-A160-4949-9419-421C4DFEE441}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS installer-env

COPY ./ServiceNowIntegrationService /src/dotnet-function-app
COPY ./Shared /Shared
RUN cd /src/dotnet-function-app && \
mkdir -p /home/site/wwwroot && \
dotnet publish *.csproj --output /home/site/wwwroot

# To enable ssh & remote debugging on app service change the base image to the one below
# FROM mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0-appservice
FROM mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
AzureFunctionsJobHost__Logging__Console__IsEnabled=true

COPY --from=installer-env ["/home/site/wwwroot", "/home/site/wwwroot"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Common;
using Microsoft.Azure.Functions.Worker.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

var host = new HostBuilder()
.ConfigureFunctionsWebApplication()
.ConfigureServices(services =>
{
services.AddSingleton<ICreateResponse, CreateResponse>();
})
.Build();

await host.RunAsync();
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
namespace NHS.CohortManager.ServiceNowIntegrationService;

using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.Logging;
using Common;
using Microsoft.Azure.Functions.Worker.Http;
using System.Net;

public class ReceiveServiceNowMessage
{
private readonly ILogger<ReceiveServiceNowMessage> _logger;

private readonly ICreateResponse _createResponse;


public ReceiveServiceNowMessage(ILogger<ReceiveServiceNowMessage> logger, ICreateResponse createResponse)
{
_logger = logger;
_createResponse = createResponse;
}

[Function("ReceiveServiceNowMessage")]
public HttpResponseData Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequestData req)
{
_logger.LogInformation("ReceiveServiceNowMessage function processed a request.");
return _createResponse.CreateHttpResponse(HttpStatusCode.OK, req);
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Using Include="System.Threading.ExecutionContext" Alias="ExecutionContext" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Shared\Common\Common.csproj" />
<ProjectReference Include="..\Shared\Data\Data.csproj" />
<ProjectReference Include="..\Shared\Model\Model.csproj" />
</ItemGroup>
</Project>
Empty file.
12 changes: 12 additions & 0 deletions infrastructure/tf-core/environments/development.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,18 @@ function_apps = {
]
}

ReceiveServiceNowMessage = {
name_suffix = "receive-service-now-message"
function_endpoint_name = "ReceiveServiceNowMessage"
app_service_plan_key = "DefaultPlan"
app_urls = [
{
env_var_name = "ExceptionFunctionURL"
function_app_key = "CreateException"
}
]
}

BsRequestAuditDataService = {
name_suffix = "bs-request-audit-data-service"
function_endpoint_name = "BsRequestAuditDataService"
Expand Down
1 change: 1 addition & 0 deletions scripts/deployment/get-docker-names.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ declare -A docker_functions_map=(
["ParticipantManagementServices/UpdateParticipantFromScreeningProvider"]="update-participant-from-screening-provider"
["screeningDataServices/BsSelectGpPractice"]="bs-select-gp-practice-data-service"
["ParticipantManagementServices/CheckParticipantExists"]="check-participant-exists"
["ServiceNowIntegrationService"]="receive-service-now-message"
["screeningDataServices/BsSelectOutCode"]="bs-select-outcode-data-service"
["screeningDataServices/BsSelectRequestAudit"]="bs-request-audit-data-service"
["screeningDataServices/CohortDistributionDataService"]="cohort-distribution-data-service"
Expand Down