-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/FSADT1-1189
- Loading branch information
Showing
27 changed files
with
680 additions
and
204 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,6 +232,25 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Deploy Database Backup | ||
uses: bcgov-nr/[email protected] | ||
with: | ||
file: database/openshift.backup.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
overwrite: true | ||
parameters: | ||
-p ZONE=${{ github.event.number }} -p NAME=${{ github.event.repository.name }} | ||
-p PROMOTE=${{ github.repository }}/database:${{ github.event.number }} | ||
|
||
- name: Backup database before update | ||
run: | | ||
oc login --token=${{ secrets.OC_TOKEN }} --server=${{ secrets.OC_SERVER }} | ||
oc project ${{ secrets.OC_NAMESPACE }} | ||
# Run a backup before deploying a new version | ||
oc create job --from=cronjob/${{ github.event.repository.name }}-${{ github.event.number }}-database-backup ${{ github.event.repository.name }}-${{ github.event.number }}-database-backup-$(date +%Y%m%d%H%M%S) | ||
- name: Deploy Database | ||
uses: bcgov-nr/[email protected] | ||
with: | ||
|
@@ -381,6 +400,25 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Deploy Database Backup | ||
uses: bcgov-nr/[email protected] | ||
with: | ||
file: database/openshift.backup.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
overwrite: true | ||
parameters: | ||
-p ZONE=${{ github.event.number }} -p NAME=${{ github.event.repository.name }} | ||
-p PROMOTE=${{ github.repository }}/database:${{ github.event.number }} | ||
|
||
- name: Backup database before update | ||
run: | | ||
oc login --token=${{ secrets.OC_TOKEN }} --server=${{ secrets.OC_SERVER }} | ||
oc project ${{ secrets.OC_NAMESPACE }} | ||
# Run a backup before deploying a new version | ||
oc create job --from=cronjob/${{ github.event.repository.name }}-${{ github.event.number }}-database-backup ${{ github.event.repository.name }}-${{ github.event.number }}-database-backup-$(date +%Y%m%d%H%M%S) | ||
- name: Deploy Database | ||
uses: bcgov-nr/[email protected] | ||
with: | ||
|
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ concurrency: | |
jobs: | ||
pr-validation: | ||
name: Pull Request Validation | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.changelog.outputs.version }} | ||
url_zone: ${{ steps.calculate.outputs.url_zone }} | ||
|
@@ -62,7 +62,7 @@ jobs: | |
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Comment PR | ||
continue-on-error: true | ||
uses: thollander/actions-comment-pull-request@v2 | ||
|
@@ -183,6 +183,25 @@ jobs: | |
-p COGNITO_LOGOUT_URI='https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/logout?redirect_uri=https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}' | ||
-p CHES_MAIL_COPY=${{ secrets.CHES_MAIL_COPY }} | ||
|
||
- name: Deploy Database Backup | ||
uses: bcgov-nr/[email protected] | ||
with: | ||
file: database/openshift.backup.yml | ||
oc_namespace: ${{ secrets.OC_NAMESPACE }} | ||
oc_server: ${{ secrets.OC_SERVER }} | ||
oc_token: ${{ secrets.OC_TOKEN }} | ||
overwrite: true | ||
parameters: | ||
-p ZONE=${{ github.event.number }} -p NAME=${{ github.event.repository.name }} | ||
-p PROMOTE=${{ github.repository }}/database:${{ github.event.number }} | ||
|
||
- name: Backup database before update | ||
run: | | ||
oc login --token=${{ secrets.OC_TOKEN }} --server=${{ secrets.OC_SERVER }} | ||
oc project ${{ secrets.OC_NAMESPACE }} | ||
# Run a backup before deploying a new version | ||
oc create job --from=cronjob/${{ github.event.repository.name }}-${{ github.event.number }}-database-backup ${{ github.event.repository.name }}-${{ github.event.number }}-database-backup-$(date +%Y%m%d%H%M%S) | ||
- name: Deploy Database | ||
uses: bcgov-nr/[email protected] | ||
with: | ||
|
@@ -257,7 +276,7 @@ jobs: | |
-p PROMOTE=${{ github.repository }}/processor:${{ github.event.number }} | ||
-p URL_ZONE=${{ needs.pr-validation.outputs.url_zone }} | ||
-p BCREGISTRY_URI='https://bcregistry-prod.apigee.net' | ||
|
||
cypress-run: | ||
name: "User flow test" | ||
runs-on: ubuntu-22.04 | ||
|
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
10 changes: 10 additions & 0 deletions
10
backend/src/main/java/ca/bc/gov/app/dto/client/DistrictDto.java
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,10 @@ | ||
package ca.bc.gov.app.dto.client; | ||
|
||
|
||
public record DistrictDto( | ||
String code, | ||
String description, | ||
String emails | ||
) { | ||
|
||
} |
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
37 changes: 37 additions & 0 deletions
37
backend/src/main/java/ca/bc/gov/app/entity/client/DistrictCodeEntity.java
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,37 @@ | ||
package ca.bc.gov.app.entity.client; | ||
|
||
import ca.bc.gov.app.ApplicationConstant; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Size; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
import lombok.With; | ||
import org.springframework.data.annotation.Id; | ||
import org.springframework.data.relational.core.mapping.Column; | ||
import org.springframework.data.relational.core.mapping.Table; | ||
|
||
@Table(name = "district_code", schema = ApplicationConstant.POSTGRES_ATTRIBUTE_SCHEMA) | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
@ToString(callSuper = true) | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@With | ||
public class DistrictCodeEntity extends ExpirableBaseEntity { | ||
|
||
@Id | ||
@Column("district_code") | ||
@NotNull | ||
@Size(min = 2, max = 5) | ||
private String code; | ||
|
||
@Column("email_address") | ||
@NotNull | ||
private String emailAddress; | ||
|
||
} |
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
20 changes: 20 additions & 0 deletions
20
backend/src/main/java/ca/bc/gov/app/repository/client/DistrictCodeRepository.java
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,20 @@ | ||
package ca.bc.gov.app.repository.client; | ||
|
||
import ca.bc.gov.app.entity.client.DistrictCodeEntity; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.repository.reactive.ReactiveCrudRepository; | ||
import org.springframework.data.repository.reactive.ReactiveSortingRepository; | ||
import org.springframework.stereotype.Repository; | ||
import reactor.core.publisher.Flux; | ||
import reactor.core.publisher.Mono; | ||
|
||
@Repository | ||
public interface DistrictCodeRepository | ||
extends ReactiveCrudRepository<DistrictCodeEntity, String>, | ||
ReactiveSortingRepository<DistrictCodeEntity, String> { | ||
|
||
Flux<DistrictCodeEntity> findAllBy(Pageable pageable); | ||
|
||
Mono<DistrictCodeEntity> findByCode(String code); | ||
|
||
} |
Oops, something went wrong.