Skip to content

Commit

Permalink
Merge pull request #497 from asanchezr/master
Browse files Browse the repository at this point in the history
Deploy IS13 to UAT
  • Loading branch information
asanchezr authored Nov 12, 2021
2 parents 8092389 + f78ce10 commit 19af931
Show file tree
Hide file tree
Showing 416 changed files with 143,926 additions and 13,600 deletions.
7 changes: 7 additions & 0 deletions .github/.trufflehog3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ exclude: # exclude matching issues
id: high-entropy
paths:
- realm-export.json
- message: Ignore SSIS .dtsx files (binary content and verifiers)
paths:
- "*.dtsx"
- message: Ignore SSIS .dtproj state
pattern: <State>.*?</State>
paths:
- "*.dtproj"
# NOTE you can also specify IDs or patterns together or without paths, e.g.
#
# - message: Skip ID everywhere
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @devinleighsmith @jdtoombs @asanchezr @rpbcg
* @devinleighsmith @jdtoombs @asanchezr @rpbcg @FuriousLlama

# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/app-react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -72,17 +72,17 @@ jobs:
-Dsonar.projectKey=${{env.PROJECT_KEY}}
-Dsonar.projectName=${{env.PROJECT_NAME}}
-Dsonar.qualitygate.wait=true
- name: Find Comment
if: failure() && steps.scan.outcome == 'failure' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
uses: peter-evans/find-comment@v1
id: fc
with:
token: ${{secrets.GITHUB_TOKEN}}
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
comment-author: "github-actions[bot]"
body-includes: QUALITY GATE STATUS FOR APP-REACT

- name: Check Quality Gate and Create Comment
uses: peter-evans/create-or-update-comment@v1
if: failure() && steps.scan.outcome == 'failure' && github.event_name == 'pull_request' && steps.fc.outputs.comment-id == '' && github.event.pull_request.head.repo.full_name == github.repository
Expand All @@ -94,9 +94,9 @@ jobs:
issue-number: ${{ github.event.pull_request.number }}
body: |
QUALITY GATE STATUS FOR APP-REACT: FAILED.
[View and resolve details on][1]
[1]: ${{env.SONAR_HOST_URL}}/dashboard?id=${{env.PROJECT_KEY}}
reactions: confused
- name: Check Quality Gate and Update Comment
Expand All @@ -111,9 +111,9 @@ jobs:
issue-number: ${{ github.event.pull_request.number }}
body: |
QUALITY GATE STATUS FOR APP-REACT: FAILED.
[View and resolve details on][1]
[1]: ${{env.SONAR_HOST_URL}}/dashboard?id=${{env.PROJECT_KEY}}
edit-mode: replace
reactions: eyes
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ auth/keycloak/config/hsperfdata_jboss/
auth/keycloak/config/*.log
trufflehog_report.*
datastore.xml
**/.vscode/
61 changes: 58 additions & 3 deletions backend/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ trim_trailing_whitespace = true
[*.ts]
indent_size = 2

[*.cs]
indent_size = 4

[*.md]
max_line_length = off
trim_trailing_whitespace = false
Expand All @@ -25,3 +22,61 @@ insert_final_newline = false
# Use tabs for indentation (Makefiles require tabs)
indent_style = tab

[*.cs]
indent_size = 4

# IDE0005: Using directive is unnecessary.
dotnet_diagnostic.IDE0005.severity = warning
# CA1032: Implement standard exception constructors
dotnet_diagnostic.CA1032.severity = warning
# CA1816: Call GC.SuppressFinalize correctly
dotnet_diagnostic.CA1816.severity = error
# CA1063: Implement IDisposable correctly
dotnet_diagnostic.CA1063.severity = error
# CA2007: Do not directly await a Task
dotnet_diagnostic.CA2007.severity = none
# CA1062: Validate arguments of public methods
dotnet_diagnostic.CA1062.severity = none
# CA1031: Do not catch general exception types
dotnet_diagnostic.CA1031.severity = none
# CA2000: Dispose objects before losing scope
dotnet_diagnostic.CA2000.severity = error
# CA1508: Avoid dead conditional code
dotnet_diagnostic.CA1508.severity = none #TODO: Requires further analysis
# CA1305: Specify IFormatProvider
dotnet_diagnostic.CA1305.severity = none # #TODO: Requires further analysis
# CA1801: Review unused parameters
dotnet_diagnostic.CA1801.severity = none # #TODO: Requires further analysis
# CA1822: Mark members as static
dotnet_diagnostic.CA1822.severity = warning
# CS1591: Missing XML comment
dotnet_diagnostic.CS1591.severity = none

# SonarQube
# S4487 Unread "private" fields should be removed.
dotnet_diagnostic.S4487.severity = warning
# S927 Parameter names should match base declaration and other partial definitions
dotnet_diagnostic.S927.severity = error
# S1006 Remove the default parameter value to match the signature of overridden method
dotnet_diagnostic.S1006.severity = error
# S3928 The parameter name '{param}' is not declared in the argument list
dotnet_diagnostic.S3928.severity = error
# S1481 Remove the unused local variable
dotnet_diagnostic.S1481.severity = warning
# S1135 Complete the task associated to this 'TODO' comment
dotnet_diagnostic.S1135.severity = none
# S1116 Remove empty statement
dotnet_diagnostic.S1116.severity = warning
# S1118 Utility classes should not have public constructors
dotnet_diagnostic.S1118.severity = error
# S3925 "ISerializable" should be implemented correctly
dotnet_diagnostic.S3925.severity = error
# S4457 Parameter validation in "async"/"await" methods should be wrapped
dotnet_diagnostic.S4457.severity = error
# S3442 "abstract" classes should not have "public" constructors
dotnet_diagnostic.S3442.severity = error
# S125 Remove commented out code
dotnet_diagnostic.S125.severity = error
# S4136 Method overloads should be adjacent
dotnet_diagnostic.S4136.severity = none

18 changes: 18 additions & 0 deletions backend/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<AnalysisMode>Minimum</AnalysisMode>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.27.0.35380">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)\..\.editorconfig" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ EXPOSE 443 8080
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY *.sln .
COPY Directory.Build.props .
COPY api/*.csproj api/
COPY entities/*.csproj entities/
COPY tests/core/*.csproj tests/core/
Expand All @@ -16,7 +17,6 @@ COPY dal/*.csproj dal/
COPY dal.keycloak/*.csproj dal.keycloak/
COPY keycloak/*.csproj keycloak/
COPY geocoder/*.csproj geocoder/
COPY ches/*.csproj ches/
COPY core/*.csproj core/
COPY ltsa/*.csproj ltsa/

Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile.3.1
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ EXPOSE 443 8080
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /src
COPY *.sln .
COPY Directory.Build.props .
COPY api/*.csproj api/
COPY entities/*.csproj entities/
COPY tests/core/*.csproj tests/core/
Expand All @@ -16,7 +17,6 @@ COPY dal/*.csproj dal/
COPY dal.keycloak/*.csproj dal.keycloak/
COPY keycloak/*.csproj keycloak/
COPY geocoder/*.csproj geocoder/
COPY ches/*.csproj ches/
COPY core/*.csproj core/

RUN dotnet restore
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile.ocp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ EXPOSE 443 8080
FROM image-registry.apps.silver.devops.gov.bc.ca/3cd915-tools/dotnet-sdk:5.0 AS build
WORKDIR /src
COPY *.sln .
COPY Directory.Build.props .
COPY api/*.csproj api/
COPY entities/*.csproj entities/
COPY tests/core/*.csproj tests/core/
Expand All @@ -16,7 +17,6 @@ COPY dal/*.csproj dal/
COPY dal.keycloak/*.csproj dal.keycloak/
COPY keycloak/*.csproj keycloak/
COPY geocoder/*.csproj geocoder/
COPY ches/*.csproj ches/
COPY core/*.csproj core/
COPY ltsa/*.csproj ltsa/

Expand Down
15 changes: 0 additions & 15 deletions backend/Pims.sln
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pims.Core.Test", "tests\cor
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pims.Geocoder", "geocoder\Pims.Geocoder.csproj", "{BF7450E8-B3C5-46FB-BEC1-C5FC1C5964DC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pims.Ches", "ches\Pims.Ches.csproj", "{08A82D74-0854-498F-9C74-E0A7242FE430}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pims.Ltsa", "ltsa\Pims.Ltsa.csproj", "{1ED5DF03-7784-44EC-B02B-516167210CCF}"
EndProject
Global
Expand Down Expand Up @@ -190,18 +188,6 @@ Global
{BF7450E8-B3C5-46FB-BEC1-C5FC1C5964DC}.Release|x64.Build.0 = Release|Any CPU
{BF7450E8-B3C5-46FB-BEC1-C5FC1C5964DC}.Release|x86.ActiveCfg = Release|Any CPU
{BF7450E8-B3C5-46FB-BEC1-C5FC1C5964DC}.Release|x86.Build.0 = Release|Any CPU
{08A82D74-0854-498F-9C74-E0A7242FE430}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08A82D74-0854-498F-9C74-E0A7242FE430}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08A82D74-0854-498F-9C74-E0A7242FE430}.Debug|x64.ActiveCfg = Debug|Any CPU
{08A82D74-0854-498F-9C74-E0A7242FE430}.Debug|x64.Build.0 = Debug|Any CPU
{08A82D74-0854-498F-9C74-E0A7242FE430}.Debug|x86.ActiveCfg = Debug|Any CPU
{08A82D74-0854-498F-9C74-E0A7242FE430}.Debug|x86.Build.0 = Debug|Any CPU
{08A82D74-0854-498F-9C74-E0A7242FE430}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08A82D74-0854-498F-9C74-E0A7242FE430}.Release|Any CPU.Build.0 = Release|Any CPU
{08A82D74-0854-498F-9C74-E0A7242FE430}.Release|x64.ActiveCfg = Release|Any CPU
{08A82D74-0854-498F-9C74-E0A7242FE430}.Release|x64.Build.0 = Release|Any CPU
{08A82D74-0854-498F-9C74-E0A7242FE430}.Release|x86.ActiveCfg = Release|Any CPU
{08A82D74-0854-498F-9C74-E0A7242FE430}.Release|x86.Build.0 = Release|Any CPU
{1ED5DF03-7784-44EC-B02B-516167210CCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1ED5DF03-7784-44EC-B02B-516167210CCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1ED5DF03-7784-44EC-B02B-516167210CCF}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -230,7 +216,6 @@ Global
{04780892-FC30-4B6B-A10C-5795C657E574} = {F256F2A5-0DBF-4137-A7D6-21F08111BD4A}
{5A83C636-741A-4795-8588-70F033E79B5A} = {04780892-FC30-4B6B-A10C-5795C657E574}
{BF7450E8-B3C5-46FB-BEC1-C5FC1C5964DC} = {5237F8A4-67F5-4751-B8B2-B93A06791480}
{08A82D74-0854-498F-9C74-E0A7242FE430} = {5237F8A4-67F5-4751-B8B2-B93A06791480}
{1ED5DF03-7784-44EC-B02B-516167210CCF} = {5237F8A4-67F5-4751-B8B2-B93A06791480}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
8 changes: 2 additions & 6 deletions backend/api/Areas/Admin/Controllers/RoleController.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
using System;
using MapsterMapper;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Pims.Api.Policies;
using Pims.Dal;
using Pims.Dal.Entities;
using Pims.Dal.Security;
using Swashbuckle.AspNetCore.Annotations;
using System;
using Entity = Pims.Dal.Entities;
using Model = Pims.Api.Areas.Admin.Models.Role;

Expand All @@ -24,7 +23,6 @@ namespace Pims.Api.Areas.Admin.Controllers
public class RoleController : ControllerBase
{
#region Variables
private readonly ILogger<RoleController> _logger;
private readonly IPimsService _pimsService;
private readonly IMapper _mapper;
#endregion
Expand All @@ -33,12 +31,10 @@ public class RoleController : ControllerBase
/// <summary>
/// Creates a new instance of a RoleController class, initializes it with the specified arguments.
/// </summary>
/// <param name="logger"></param>
/// <param name="pimsService"></param>
/// <param name="mapper"></param>
public RoleController(ILogger<RoleController> logger, IPimsService pimsService, IMapper mapper)
public RoleController(IPimsService pimsService, IMapper mapper)
{
_logger = logger;
_pimsService = pimsService;
_mapper = mapper;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;

namespace Pims.Api.Areas.Admin.Models.AccessRequest
{
public class AccessRequestModel : Api.Models.BaseAppModel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;

namespace Pims.Api.Areas.Keycloak.Models.AccessRequest
{
public class AccessRequestModel : Api.Models.BaseAppModel
Expand Down
3 changes: 1 addition & 2 deletions backend/api/Areas/Leases/Controllers/SearchController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using Swashbuckle.AspNetCore.Annotations;
using System;
using System.Collections.Generic;
using System.Linq;

namespace Pims.Api.Areas.Lease.Controllers
{
Expand Down Expand Up @@ -55,7 +54,7 @@ public SearchController(IPimsService pimsService, IMapper mapper)
[HttpGet]
[HasPermission(Permissions.PropertyView)]
[Produces("application/json")]
[ProducesResponseType(typeof(IEnumerable< LeaseModel>), 200)]
[ProducesResponseType(typeof(IEnumerable<LeaseModel>), 200)]
[ProducesResponseType(typeof(Api.Models.ErrorResponseModel), 400)]
[SwaggerOperation(Tags = new[] { "lease" })]
public IActionResult GetLeases()
Expand Down
6 changes: 3 additions & 3 deletions backend/api/Areas/Leases/Mapping/Lease/LeaseMap.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Mapster;
using Pims.Dal.Helpers.Extensions;
using System.Linq;
using Entity = Pims.Dal.Entities;
using Model = Pims.Api.Areas.Lease.Models.Lease;
using System.Linq;

namespace Pims.Api.Areas.Lease.Mapping.Lease
{
Expand Down Expand Up @@ -30,8 +30,8 @@ public void Register(TypeAdapterConfig config)
.Map(dest => dest.Note, src => src.Note)
.Map(dest => dest.Description, src => src.Description)
.Map(dest => dest.Persons, src => src.Persons)
.Map(dest => dest.Organizations, src => src.Organizations);

.Map(dest => dest.Organizations, src => src.Organizations)
.Map(dest => dest.TenantNotes, src => src.TenantsManyToMany.Select(t => t.Note));
}
}
}
3 changes: 1 addition & 2 deletions backend/api/Areas/Leases/Mapping/Lease/OrganizationMap.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Mapster;
using Pims.Dal.Entities.Helpers;
using Pims.Dal.Helpers.Extensions;
using System.Linq;
using Entity = Pims.Dal.Entities;
using Model = Pims.Api.Areas.Lease.Models.Lease;

Expand All @@ -19,7 +18,7 @@ public void Register(TypeAdapterConfig config)
.Map(dest => dest.Landline, src => src.GetLandlinePhoneNumber())
.Map(dest => dest.Mobile, src => src.GetMobilePhoneNumber())
.Map(dest => dest.Email, src => src.GetEmail());

}
}
}
1 change: 0 additions & 1 deletion backend/api/Areas/Leases/Mapping/Lease/PersonMap.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Mapster;
using Pims.Dal.Entities;
using Pims.Dal.Helpers.Extensions;
using System.Linq;
using Entity = Pims.Dal.Entities;
using Model = Pims.Api.Areas.Lease.Models.Lease;

Expand Down
2 changes: 0 additions & 2 deletions backend/api/Areas/Leases/Mapping/Lease/PropertyMap.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Mapster;
using Pims.Dal.Helpers.Extensions;
using System.Linq;
using Entity = Pims.Dal.Entities;
using Model = Pims.Api.Areas.Lease.Models.Lease;

Expand Down
1 change: 0 additions & 1 deletion backend/api/Areas/Leases/Mapping/Search/LeaseMap.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Mapster;
using Pims.Dal.Helpers.Extensions;
using System.Linq;
using Entity = Pims.Dal.Entities;
using Model = Pims.Api.Areas.Lease.Models.Search;

Expand Down
5 changes: 0 additions & 5 deletions backend/api/Areas/Leases/Models/Lease/AddressModel.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Pims.Api.Areas.Lease.Models.Lease
{
public class AddressModel
Expand Down
Loading

0 comments on commit 19af931

Please sign in to comment.