Skip to content

Commit

Permalink
Merge pull request #529 from bcgov/1.3.3
Browse files Browse the repository at this point in the history
1.3.3
  • Loading branch information
AdvSol-Darrel authored Feb 11, 2021
2 parents a91e997 + b29ed27 commit 1617189
Show file tree
Hide file tree
Showing 31 changed files with 1,389 additions and 299 deletions.
8 changes: 4 additions & 4 deletions .pipeline/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ const name = 'hmcr'

const phases = {
build: {namespace:'txkggj-tools' , name: `${name}`, phase: 'build' , changeId:changeId, suffix: `-build-${changeId}` , instance: `${name}-build-${changeId}` , version:`${version}-${changeId}` , tag:`build-${version}-${changeId}`, transient: true},
dev: {namespace:'txkggj-dev' , name: `${name}`, phase: 'dev' , changeId:changeId, suffix: `-dev-${changeId}` , instance: `${name}-dev-${changeId}` , version:`${version}-${changeId}` , tag:`dev-${version}-${changeId}` , host: `hmcr-${changeId}-txkggj-dev.pathfinder.gov.bc.ca` , url_prefix: 'dev-', bceid_service: '.test' , export_server: 'devoas1', dotnet_env: 'Development', transient: true},
test: {namespace:'txkggj-test' , name: `${name}`, phase: 'test' , changeId:changeId, suffix: `-test` , instance: `${name}-test` , version:`${version}` , tag:`test-${version}` , host: `hmcr-txkggj-test.pathfinder.gov.bc.ca` , url_prefix: 'tst-', bceid_service: '.test' , export_server: 'tstoas2', dotnet_env: 'Staging'},
uat: {namespace:'txkggj-test' , name: `${name}`, phase: 'uat' , changeId:changeId, suffix: `-uat` , instance: `${name}-uat` , version:`${version}` , tag:`uat-${version}` , host: `hmcr-txkggj-uat.pathfinder.gov.bc.ca` , url_prefix: 'uat-', bceid_service: '.test' , export_server: 'tstoas2', dotnet_env: 'UAT'},
prod: {namespace:'txkggj-prod' , name: `${name}`, phase: 'prod' , changeId:changeId, suffix: `-prod` , instance: `${name}-prod` , version:`${version}` , tag:`prod-${version}` , host: `hmcr-txkggj-prod.pathfinder.gov.bc.ca` , url_prefix: '' , bceid_service: '' , export_server: 'prdoas2', dotnet_env: 'Production'},
dev: {namespace:'txkggj-dev' , name: `${name}`, phase: 'dev' , changeId:changeId, suffix: `-dev-${changeId}` , instance: `${name}-dev-${changeId}` , version:`${version}-${changeId}` , tag:`dev-${version}-${changeId}` , host: `hmcr-${changeId}-txkggj-dev.pathfinder.gov.bc.ca` , url_prefix: 'dev-', bceid_service: '.test' , oas_server: 'devoas1', dotnet_env: 'Development', transient: true},
test: {namespace:'txkggj-test' , name: `${name}`, phase: 'test' , changeId:changeId, suffix: `-test` , instance: `${name}-test` , version:`${version}` , tag:`test-${version}` , host: `hmcr-txkggj-test.pathfinder.gov.bc.ca` , url_prefix: 'tst-', bceid_service: '.test' , oas_server: 'tstoas2', dotnet_env: 'Staging'},
uat: {namespace:'txkggj-test' , name: `${name}`, phase: 'uat' , changeId:changeId, suffix: `-uat` , instance: `${name}-uat` , version:`${version}` , tag:`uat-${version}` , host: `hmcr-txkggj-uat.pathfinder.gov.bc.ca` , url_prefix: 'uat-', bceid_service: '.test' , oas_server: 'tstoas2', dotnet_env: 'UAT'},
prod: {namespace:'txkggj-prod' , name: `${name}`, phase: 'prod' , changeId:changeId, suffix: `-prod` , instance: `${name}-prod` , version:`${version}` , tag:`prod-${version}` , host: `hmcr-txkggj-prod.pathfinder.gov.bc.ca` , url_prefix: '' , bceid_service: '' , oas_server: 'prdoas2', dotnet_env: 'Production'},
};

// This callback forces the node process to exit as failure.
Expand Down
4 changes: 3 additions & 1 deletion .pipeline/lib/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ module.exports = settings => {
ENV: phases[phase].phase,
SUBMISSION_URL: `https://${phases[phase].url_prefix}hmcr.th.gov.bc.ca/workreporting?serviceArea={0}&showResult={1}`,
BCEID_SERVICE: `https://gws1${phases[phase].bceid_service}.bceid.ca/webservices/client/v10/bceidservice.asmx`,
EXPORT_URL: `https://${phases[phase].export_server}.apps.th.gov.bc.ca`
EXPORT_URL: `https://${phases[phase].oas_server}.apps.th.gov.bc.ca`,
OAS_URL: `https://${phases[phase].oas_server}.apps.th.gov.bc.ca`,
GEOSERVER_TIMEOUT: 120
}
}
)
Expand Down
10 changes: 8 additions & 2 deletions api/Hmcr.Api/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
{
"Name": "Async",
"Args": {
"configure": [{ "Name": "Console" }]
"configure": [ { "Name": "Console" } ]
}
}
],
"Enrich": ["FromLogContext", "WithMachineName"]
"Enrich": [ "FromLogContext", "WithMachineName" ]
},
"ConnectionStrings": {
"HMCR": "Server=(localdb)\\mssqllocaldb;Database=HMR_DEV;Trusted_Connection=True;MultipleActiveResultSets=true"
Expand All @@ -40,6 +40,12 @@
"WFSExportPath": "ogs-geoV06/ows?service=WFS&version=2.0.0&request=GetFeature",
"KMLExportPath": "ogs-geoV06/wms/kml?mode=download&styles=HMR_GENERIC_FOR_KML"
},
"Timeouts": {
"MapsAPI": 15,
"OasAPI": 15,
"ExportAPI": 15,
"InventoryAPI": 120
},
"JWT": {
"Authority": "https://sso-dev.pathfinder.gov.bc.ca/auth/realms/<realmid>",
"Audience": "<app-id>"
Expand Down
9 changes: 5 additions & 4 deletions api/Hmcr.Chris/ChrisServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ public static void AddChrisHttpClient(this IServiceCollection services, IConfigu
services.AddHttpClient<IMapsApi, MapsApi>(client =>
{
client.BaseAddress = new Uri(config.GetValue<string>("CHRIS:MapUrl"));
client.Timeout = new TimeSpan(0, 0, 15);
client.Timeout = new TimeSpan(0, 0, config.GetValue<int>("Timeouts:MapsAPI"));
client.DefaultRequestHeaders.Clear();
});

services.AddHttpClient<IOasApi, OasApi>(client =>
{
client.BaseAddress = new Uri(config.GetValue<string>("CHRIS:OASUrl"));
client.Timeout = new TimeSpan(0, 0, 15);
client.Timeout = new TimeSpan(0, 0, config.GetValue<int>("Timeouts:OasAPI"));
client.DefaultRequestHeaders.Clear();

var userId = config.GetValue<string>("ServiceAccount:User");
Expand All @@ -32,7 +32,7 @@ public static void AddChrisHttpClient(this IServiceCollection services, IConfigu
services.AddHttpClient<IExportApi, ExportApi>(client =>
{
client.BaseAddress = new Uri(config.GetValue<string>("CHRIS:ExportUrl"));
client.Timeout = new TimeSpan(0, 0, 15);
client.Timeout = new TimeSpan(0, 0, config.GetValue<int>("Timeouts:ExportAPI"));
client.DefaultRequestHeaders.Clear();

var userId = config.GetValue<string>("ServiceAccount:User");
Expand All @@ -44,7 +44,8 @@ public static void AddChrisHttpClient(this IServiceCollection services, IConfigu
services.AddHttpClient<IInventoryApi, InventoryApi>(client =>
{
client.BaseAddress = new Uri(config.GetValue<string>("CHRIS:OASUrl"));
client.Timeout = new TimeSpan(0, 0, 45);
//TODO: need to set the timeouts to be configurable with the ConfigMap of OCP
client.Timeout = new TimeSpan(0, 0, config.GetValue<int>("Timeouts:InventoryAPI"));
client.DefaultRequestHeaders.Clear();

var userId = config.GetValue<string>("ServiceAccount:User");
Expand Down
1 change: 1 addition & 0 deletions api/Hmcr.Chris/Hmcr.Chris.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.2" />
<PackageReference Include="Microsoft.Extensions.Http" Version="3.1.2" />
<PackageReference Include="NetTopologySuite" Version="2.1.0" />
</ItemGroup>

</Project>
Loading

0 comments on commit 1617189

Please sign in to comment.