Skip to content

Commit 1617189

Browse files
Merge pull request #529 from bcgov/1.3.3
1.3.3
2 parents a91e997 + b29ed27 commit 1617189

31 files changed

+1389
-299
lines changed

.pipeline/lib/config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ const name = 'hmcr'
66

77
const phases = {
88
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},
9-
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},
10-
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'},
11-
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'},
12-
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'},
9+
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},
10+
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'},
11+
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'},
12+
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'},
1313
};
1414

1515
// This callback forces the node process to exit as failure.

.pipeline/lib/deploy.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ module.exports = settings => {
7676
ENV: phases[phase].phase,
7777
SUBMISSION_URL: `https://${phases[phase].url_prefix}hmcr.th.gov.bc.ca/workreporting?serviceArea={0}&showResult={1}`,
7878
BCEID_SERVICE: `https://gws1${phases[phase].bceid_service}.bceid.ca/webservices/client/v10/bceidservice.asmx`,
79-
EXPORT_URL: `https://${phases[phase].export_server}.apps.th.gov.bc.ca`
79+
EXPORT_URL: `https://${phases[phase].oas_server}.apps.th.gov.bc.ca`,
80+
OAS_URL: `https://${phases[phase].oas_server}.apps.th.gov.bc.ca`,
81+
GEOSERVER_TIMEOUT: 120
8082
}
8183
}
8284
)

api/Hmcr.Api/appsettings.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
{
1717
"Name": "Async",
1818
"Args": {
19-
"configure": [{ "Name": "Console" }]
19+
"configure": [ { "Name": "Console" } ]
2020
}
2121
}
2222
],
23-
"Enrich": ["FromLogContext", "WithMachineName"]
23+
"Enrich": [ "FromLogContext", "WithMachineName" ]
2424
},
2525
"ConnectionStrings": {
2626
"HMCR": "Server=(localdb)\\mssqllocaldb;Database=HMR_DEV;Trusted_Connection=True;MultipleActiveResultSets=true"
@@ -40,6 +40,12 @@
4040
"WFSExportPath": "ogs-geoV06/ows?service=WFS&version=2.0.0&request=GetFeature",
4141
"KMLExportPath": "ogs-geoV06/wms/kml?mode=download&styles=HMR_GENERIC_FOR_KML"
4242
},
43+
"Timeouts": {
44+
"MapsAPI": 15,
45+
"OasAPI": 15,
46+
"ExportAPI": 15,
47+
"InventoryAPI": 120
48+
},
4349
"JWT": {
4450
"Authority": "https://sso-dev.pathfinder.gov.bc.ca/auth/realms/<realmid>",
4551
"Audience": "<app-id>"

api/Hmcr.Chris/ChrisServiceCollectionExtensions.cs

+5-4
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ public static void AddChrisHttpClient(this IServiceCollection services, IConfigu
1313
services.AddHttpClient<IMapsApi, MapsApi>(client =>
1414
{
1515
client.BaseAddress = new Uri(config.GetValue<string>("CHRIS:MapUrl"));
16-
client.Timeout = new TimeSpan(0, 0, 15);
16+
client.Timeout = new TimeSpan(0, 0, config.GetValue<int>("Timeouts:MapsAPI"));
1717
client.DefaultRequestHeaders.Clear();
1818
});
1919

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

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

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

5051
var userId = config.GetValue<string>("ServiceAccount:User");

api/Hmcr.Chris/Hmcr.Chris.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.2" />
2727
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.2" />
2828
<PackageReference Include="Microsoft.Extensions.Http" Version="3.1.2" />
29+
<PackageReference Include="NetTopologySuite" Version="2.1.0" />
2930
</ItemGroup>
3031

3132
</Project>

0 commit comments

Comments
 (0)