Skip to content

Commit

Permalink
Merge branch 'main' into UML-3623-rework-is-valid-lpa
Browse files Browse the repository at this point in the history
  • Loading branch information
allenannom authored Oct 8, 2024
2 parents f53d036 + 5132fc2 commit bf5cf55
Show file tree
Hide file tree
Showing 28 changed files with 432 additions and 46 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/_build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
run_integration_tests: 'false'
artifact_to_dl: ''
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871

- name: cache node modules
id: cache-npm
Expand Down Expand Up @@ -111,6 +111,15 @@ jobs:
inputs.push_to_ecr == 'true' &&
(inputs.specific_path == 'all' || inputs.specific_path == matrix.svc_prefix)
- name: ecr login
id: login_ecr
uses: aws-actions/amazon-ecr-login@f8cb900d38ecff281181b9924245b4f0ddc1860a # pin@v1.5.1
with:
registries: 311462405659
if: |
inputs.push_to_ecr == 'true' &&
(inputs.specific_path == 'all' || inputs.specific_path == matrix.svc_prefix)
- name: download artifact
uses: actions/download-artifact@d0ce8fd1167ed839810201de977912a090ab10a7
with:
Expand Down Expand Up @@ -208,7 +217,7 @@ jobs:
(inputs.specific_path == 'all' || inputs.specific_path == matrix.svc_prefix)
- name: archive test results
uses: actions/upload-artifact@3eadd8b791cabf7cd572f194da82158c24125bd8
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9
with:
name: service-${{ matrix.svc_prefix }}
path: build/service-${{ matrix.svc_prefix }}
Expand Down Expand Up @@ -249,10 +258,10 @@ jobs:

- name: Trivy Image Vulnerability Scanner
id: trivy_scan
uses: aquasecurity/trivy-action@89b14e517dd8699cba3d787e53d4355cad28605c
uses: aquasecurity/trivy-action@97646fedde05bcd0961217c60b50e23f721e7ec7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
TRIVY_DB_REPOSITORY: ${{ steps.login_ecr.outputs.registry }}/trivy-db-public-ecr/aquasecurity/trivy-db:2
with:
image-ref: ${{ matrix.svc_prefix }}_${{ matrix.svc_suffix }}:latest
severity: 'HIGH,CRITICAL'
Expand All @@ -270,15 +279,6 @@ jobs:
with:
sarif_file: 'trivy-results.sarif'

- name: ecr login
id: login_ecr
uses: aws-actions/amazon-ecr-login@04c5bc7890cd4ab43124b87cf61fcfcc84500170 # pin@v1.5.1
with:
registries: 311462405659
if: |
inputs.push_to_ecr == 'true' &&
(inputs.specific_path == 'all' || inputs.specific_path == matrix.svc_prefix)
- name: tag and push container
env:
ECR_REGISTRY: ${{ steps.login_ecr.outputs.registry }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
code_coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3
- name: download artifact for front tests
id: download-artifact-front-tests
uses: actions/download-artifact@d0ce8fd1167ed839810201de977912a090ab10a7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_ecr-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
ecr-scan-results:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3

- name: configure AWS credentials ECR scan results
uses: aws-actions/configure-aws-credentials@73daff1b20af655c574cf2018ed2cc18a597bf5c # pin@v1.7.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_lint-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- folder: 'environment'
- folder: 'account'
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3

- name: Set Terraform version
working-directory: ./terraform/${{ matrix.folder }}
Expand All @@ -30,7 +30,7 @@ jobs:
TF_VERSION=$(cat .terraform-version)
echo "TF_VERSION=$TF_VERSION" >> $GITHUB_OUTPUT
- uses: hashicorp/setup-terraform@98aecdfa81f310199bf5976867c4b2841a790378 # pin@v2.0.0
- uses: hashicorp/setup-terraform@4b8e29db070e511fc9f67a42cf566d74cfc83c24 # pin@v2.0.0
with:
terraform_version: ${{ steps.set-terraform-version.outputs.TF_VERSION }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_node-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3
- uses: actions/setup-node@aca7b64a59c0063db8564e0ffdadd3887f1cbae5 # pin@v3.6.0
with:
node-version-file: '.nvmrc'
Expand All @@ -33,7 +33,7 @@ jobs:
cd service-front/web/
npm run build
- name: archive dist
uses: actions/upload-artifact@3eadd8b791cabf7cd572f194da82158c24125bd8 # pin@v3.1.0
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # pin@v3.1.0
with:
name: dist-web
path: service-front/web/dist/
2 changes: 1 addition & 1 deletion .github/workflows/_node-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3
- uses: actions/setup-node@aca7b64a59c0063db8564e0ffdadd3887f1cbae5 # pin@v3.6.0
with:
node-version-file: '.nvmrc'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_run-behat-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
build-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3

- name: install python
uses: actions/setup-python@19dfb7b659fa9e60c2f89c33335ab5f6f1792b6e # pin@v4.2.0
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
vendor/bin/behat
- name: archive failed test screenshots
uses: actions/upload-artifact@3eadd8b791cabf7cd572f194da82158c24125bd8 # pin@v3.1.0
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # pin@v3.1.0
with:
name: behat-screenshots
path: tests/smoke/failed_step_screenshots
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/_run-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
echo "admin-tag=$(echo ${TAG})" >> $GITHUB_OUTPUT
fi
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3
with:
fetch-depth: '0'

Expand All @@ -71,7 +71,7 @@ jobs:
- uses: unfor19/install-aws-cli-action@27d6061dae5d39e89be4d2246824f15e111a7e06 # pin@v1.0.3

- uses: hashicorp/setup-terraform@98aecdfa81f310199bf5976867c4b2841a790378 # pin@v2.0.0
- uses: hashicorp/setup-terraform@4b8e29db070e511fc9f67a42cf566d74cfc83c24 # pin@v2.0.0
with:
terraform_version: ${{ steps.set-terraform-version.outputs.TF_VERSION }}

Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:

- name: upload environment cluster config file
if: inputs.terraform_path == 'environment'
uses: actions/upload-artifact@3eadd8b791cabf7cd572f194da82158c24125bd8 # pin@v3.1.0
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # pin@v3.1.0
with:
name: environment_config_file_${{ inputs.workspace }}
path: terraform/environment/cluster_config.json
2 changes: 1 addition & 1 deletion .github/workflows/_seed-database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
terraform_workflow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3
with:
fetch-depth: '0'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_slack-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
send-slack-notification:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3

- name: install python
uses: actions/setup-python@19dfb7b659fa9e60c2f89c33335ab5f6f1792b6e # pin@v4.2.0
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/path-to-live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
short_sha: ${{ steps.variables.outputs.short_sha }}
semver_tag: ${{ steps.semver_tag.outputs.created_tag }}
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3
- name: extract variables for workflow
id: variables
run: |
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
- workflow_variables
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3
- name: download artifact for front tests
uses: actions/download-artifact@d0ce8fd1167ed839810201de977912a090ab10a7
with:
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
needs:
- terraform_apply_production
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3
with:
fetch-depth: '0'
- name: download cluster_config
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-path.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
short_sha: ${{ steps.variables.outputs.short_sha }}
specific_path: ${{ steps.variables.outputs.path }}
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3
with:
fetch-depth: 2
- name: get changed files in the admin folder
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scheduled-codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scheduled-tfsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
contents: read
security-events: write
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3
with:
persist-credentials: false

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scheduled-workspace-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
terraform_environment_cleanup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3

- name: Set Terraform version
working-directory: ./terraform/environment
Expand All @@ -31,7 +31,7 @@ jobs:
TF_VERSION=$(cat .terraform-version)
echo "TF_VERSION=$TF_VERSION" >> $GITHUB_OUTPUT
- uses: hashicorp/setup-terraform@98aecdfa81f310199bf5976867c4b2841a790378 # pin@v2
- uses: hashicorp/setup-terraform@4b8e29db070e511fc9f67a42cf566d74cfc83c24 # pin@v2
with:
terraform_version: ${{ steps.set-terraform-version.outputs.TF_VERSION }}
terraform_wrapper: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trivy_scan_alert_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
trivy_scan_alert_report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v3
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v3

- name: install python
uses: actions/setup-python@19dfb7b659fa9e60c2f89c33335ab5f6f1792b6e # pin@v4.2.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow-deploy-ref-to-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
short_sha: ${{ steps.variables.outputs.short_sha }}
specific_path: ${{ steps.variables.outputs.path }}
steps:
- uses: actions/checkout@6b42224f41ee5dfe5395e27c8b2746f1f9955030 # pin@v4
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4
with:
fetch-depth: 2
ref: ${{ inputs.git_ref }}
Expand Down
21 changes: 20 additions & 1 deletion service-api/app/src/App/src/Entity/LpaStore/LpaStoreAttorney.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
use App\Entity\Casters\ExtractCountryFromLpaStore;
use App\Entity\Casters\ExtractTownFromLpaStore;
use App\Entity\Person;
use App\Service\Lpa\GetAttorneyStatus\GetAttorneyStatusInterface;
use DateTimeImmutable;
use EventSauce\ObjectHydrator\DoNotSerialize;
use EventSauce\ObjectHydrator\MapFrom;
use JsonSerializable;

class LpaStoreAttorney extends Person implements JsonSerializable
class LpaStoreAttorney extends Person implements JsonSerializable, GetAttorneyStatusInterface
{
public function __construct(
#[MapFrom('address')]
Expand Down Expand Up @@ -80,4 +81,22 @@ public function jsonSerialize(): mixed

return $data;
}

#[DoNotSerialize]
public function getFirstname(): string
{
return $this->firstname;
}

#[DoNotSerialize]
public function getSurname(): string
{
return $this->surname;
}

#[DoNotSerialize]
public function getSystemStatus(): bool|string
{
return $this->systemStatus;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
use App\Entity\Casters\ExtractCountryFromLpaStore;
use App\Entity\Casters\ExtractTownFromLpaStore;
use App\Entity\Person;
use App\Service\Lpa\GetTrustCorporationStatus\TrustCorporationStatusInterface;
use DateTimeImmutable;
use EventSauce\ObjectHydrator\DoNotSerialize;
use EventSauce\ObjectHydrator\MapFrom;

class LpaStoreTrustCorporations extends Person
class LpaStoreTrustCorporations extends Person implements TrustCorporationStatusInterface
{
public function __construct(
#[MapFrom('address')]
Expand Down Expand Up @@ -68,4 +70,22 @@ public function companyName(): ?string
{
return $this->companyName;
}

#[DoNotSerialize]
public function getCompanyName(): string
{
return $this->companyName();
}

#[DoNotSerialize]
public function getSystemStatus(): bool|string
{
return $this->systemStatus;
}

#[DoNotSerialize]
public function getUid(): string
{
return $this->uId;
}
}
7 changes: 7 additions & 0 deletions service-api/app/src/App/src/Entity/Person.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace App\Entity;

use DateTimeImmutable;
use EventSauce\ObjectHydrator\DoNotSerialize;

class Person
{
Expand All @@ -28,4 +29,10 @@ public function __construct(
public readonly ?string $uId,
) {
}

#[DoNotSerialize]
public function getUid(): string
{
return $this->uId;
}
}
Loading

0 comments on commit bf5cf55

Please sign in to comment.