-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
psp-9500 Scheduler microservice (#4483)
* split off geoserver functionality into a microservice - update docker and ci/cd to support. * psp-9500 scheduler microservice. * change service scope * Readme updates. * github action corrections. --------- Co-authored-by: Smith <[email protected]>
- Loading branch information
1 parent
623b443
commit 2ebb2e6
Showing
100 changed files
with
2,587 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
ARG BUILD_CONFIGURATION=Release | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base | ||
WORKDIR /app | ||
EXPOSE 5001 5000 | ||
|
||
# Copy csproj and restore as distinct layers | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
WORKDIR /src | ||
COPY scheduler scheduler/ | ||
COPY scheduler/Directory.Build.props ./ | ||
COPY core core/ | ||
COPY apimodels apimodels/ | ||
COPY entities entities/ | ||
COPY core.api core.api/ | ||
COPY keycloak keycloak/ | ||
COPY scheduler/*.csproj scheduler/ | ||
|
||
RUN dotnet restore scheduler/Scheduler.sln | ||
ENV PATH="$PATH:/root/.dotnet/tools" | ||
# Copy everything else and build | ||
WORKDIR /src/scheduler | ||
RUN dotnet build "Pims.Scheduler.csproj" -c "$BUILD_CONFIGURATION" -o /app/build | ||
|
||
FROM build AS publish | ||
RUN dotnet publish "Pims.Scheduler.csproj" -c "$BUILD_CONFIGURATION" -o /app/publish | ||
|
||
# Runtime image | ||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
COPY entrypoint.scheduler.sh . | ||
RUN chmod +x /app/entrypoint.scheduler.sh | ||
ENTRYPOINT ["/app/entrypoint.scheduler.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
source/backend/api/Areas/Documents/DocumentQueueController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using System.Collections.Generic; | ||
using MapsterMapper; | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Pims.Api.Services; | ||
using Pims.Core.Api.Policies; | ||
using Pims.Core.Json; | ||
using Pims.Core.Security; | ||
using Pims.Dal.Entities.Models; | ||
using Swashbuckle.AspNetCore.Annotations; | ||
|
||
namespace Pims.Api.Controllers | ||
{ | ||
/// <summary> | ||
/// DocumentQueueController class, provides endpoints to handle document queue requests. | ||
/// </summary> | ||
[Authorize] | ||
[ApiController] | ||
[ApiVersion("1.0")] | ||
[Route("v{version:apiVersion}/documents/queue")] | ||
[Route("/documents")] | ||
public class DocumentQueueController : ControllerBase | ||
{ | ||
#region Variables | ||
private readonly IDocumentQueueService _documentQueueService; | ||
private readonly IMapper _mapper; | ||
#endregion | ||
|
||
#region Constructors | ||
|
||
/// <summary> | ||
/// Creates a new instance of a DocumentQueueController class. | ||
/// </summary> | ||
/// <param name="documentQueueService"></param> | ||
/// <param name="mapper"></param> | ||
public DocumentQueueController(IDocumentQueueService documentQueueService, IMapper mapper) | ||
{ | ||
_documentQueueService = documentQueueService; | ||
_mapper = mapper; | ||
} | ||
#endregion | ||
|
||
#region Endpoints | ||
|
||
/// <summary> | ||
/// Search for Document Queue items via filter. | ||
/// </summary> | ||
/// <returns></returns> | ||
[HttpGet("search")] | ||
[HasPermission(Permissions.SystemAdmin)] | ||
[Produces("application/json")] | ||
[ProducesResponseType(typeof(List<Models.Concepts.Document.DocumentTypeModel>), 200)] | ||
[SwaggerOperation(Tags = new[] { "document-types" })] | ||
[TypeFilter(typeof(NullJsonResultFilter))] | ||
public IActionResult GetDocumentTypes([FromBody] DocumentQueueFilter filter) | ||
{ | ||
var queuedDocuments = _documentQueueService.SearchDocumentQueue(filter); | ||
var documentQueueModels = _mapper.Map<List<Models.Concepts.Document.DocumentQueueModel>>(queuedDocuments); | ||
return new JsonResult(documentQueueModels); | ||
} | ||
|
||
#endregion | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.