-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from bcgov/fix/release
ci: fixing ci
- Loading branch information
Showing
8 changed files
with
175 additions
and
78 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 |
---|---|---|
|
@@ -111,15 +111,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "17" | ||
distribution: "temurin" | ||
cache: "maven" | ||
server-id: "github" | ||
|
||
- uses: bcgov-nr/[email protected] | ||
- uses: bcgov-nr/[email protected] | ||
name: Core Coverage | ||
with: | ||
commands: | | ||
|
@@ -134,11 +126,13 @@ jobs: | |
sonar_project_token: ${{ secrets.SONAR_TOKEN_COMMONS }} | ||
|
||
- name: Publish Core | ||
working-directory: ./core | ||
run: | | ||
mvn versions:set -DnewVersion='${{ needs.release.outputs.version }}' -DskipTests -Dtests.skip=true --file pom.xml | ||
mvn versions:commit | ||
mvn -B source:jar deploy --file pom.xml | ||
uses: paulushcgcj/[email protected] | ||
with: | ||
dir: core | ||
app-version: ${{ needs.release.outputs.version }} | ||
extra-params: -DskipTests -Dtests.skip=true | ||
add-sources: true | ||
add-javadoc: true | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
|
@@ -153,19 +147,11 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "17" | ||
distribution: "temurin" | ||
cache: "maven" | ||
server-id: "github" | ||
|
||
- uses: bcgov-nr/[email protected] | ||
- uses: bcgov-nr/[email protected] | ||
name: Spring Coverage | ||
with: | ||
commands: | | ||
mvn versions:use-dep-version -DdepVersion=${{ needs.release.outputs.version }} -Dincludes=ca.bc.gov.nrs-commons:forest-client-core -DforceVersion=true --file pom.xml | ||
mvn versions:use-dep-version -DdepVersion='${{ needs.release.outputs.version }}' -Dincludes=ca.bc.gov.nrs-commons:forest-client-core -DforceVersion=true --file pom.xml | ||
mvn -B verify -P all-tests checkstyle:checkstyle -Dcheckstyle.skip=false --file pom.xml | ||
dir: spring | ||
java-cache: maven | ||
|
@@ -177,11 +163,13 @@ jobs: | |
sonar_project_token: ${{ secrets.SONAR_TOKEN_COMMONS }} | ||
|
||
- name: Publish Spring | ||
working-directory: ./spring | ||
run: | | ||
mvn versions:use-dep-version -DdepVersion=${{ needs.release.outputs.version }} -Dincludes=ca.bc.gov.nrs-commons:forest-client-core -DforceVersion=true --file pom.xml | ||
mvn versions:set -DnewVersion='${{ needs.release.outputs.version }}' -DskipTests -Dtests.skip=true --file pom.xml | ||
mvn versions:commit --file pom.xml | ||
mvn -B source:jar deploy --file pom.xml | ||
uses: paulushcgcj/[email protected] | ||
with: | ||
commands: mvn versions:use-dep-version -DdepVersion=${{ needs.release.outputs.version }} -Dincludes=ca.bc.gov.nrs-commons:forest-client-core -DforceVersion=true --file pom.xml | ||
dir: spring | ||
app-version: ${{ needs.release.outputs.version }} | ||
extra-params: -DskipTests -Dtests.skip=true | ||
add-sources: true | ||
add-javadoc: true | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} |
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 |
---|---|---|
|
@@ -18,8 +18,6 @@ jobs: | |
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: refs/heads/${{ github.head_ref }} | ||
|
||
- name: Conventional Changelog Update | ||
continue-on-error: true | ||
|
@@ -31,12 +29,8 @@ jobs: | |
skip-version-file: "true" | ||
skip-commit: "true" | ||
git-push: "false" | ||
git-branch: refs/heads/${{ github.head_ref }} | ||
skip-on-empty: "false" | ||
|
||
- name: Checkout pr | ||
uses: actions/checkout@v3 | ||
|
||
- name: Removing dev core | ||
uses: paulushcgcj/[email protected] | ||
continue-on-error: true | ||
|
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 |
---|---|---|
|
@@ -153,15 +153,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "17" | ||
distribution: "temurin" | ||
cache: "maven" | ||
server-id: "github" | ||
|
||
- uses: bcgov-nr/[email protected] | ||
- uses: bcgov-nr/[email protected] | ||
name: Core Coverage | ||
with: | ||
commands: | | ||
|
@@ -176,11 +168,13 @@ jobs: | |
sonar_project_token: ${{ secrets.SONAR_TOKEN_COMMONS }} | ||
|
||
- name: Publish Core | ||
working-directory: ./core | ||
run: | | ||
mvn versions:set -DnewVersion='${{ needs.pr-validation.outputs.version }}.PR${{ github.event.number }}' -DskipTests -Dtests.skip=true --file pom.xml | ||
mvn versions:commit | ||
mvn -B source:jar deploy --file pom.xml | ||
uses: paulushcgcj/[email protected] | ||
with: | ||
dir: core | ||
app-version: ${{ needs.pr-validation.outputs.version }}.PR${{ github.event.number }} | ||
extra-params: -DskipTests -Dtests.skip=true | ||
add-sources: true | ||
add-javadoc: true | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
|
@@ -196,15 +190,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "17" | ||
distribution: "temurin" | ||
cache: "maven" | ||
server-id: "github" | ||
|
||
- uses: bcgov-nr/[email protected] | ||
- uses: bcgov-nr/[email protected] | ||
name: Spring Coverage | ||
with: | ||
commands: | | ||
|
@@ -220,11 +206,13 @@ jobs: | |
sonar_project_token: ${{ secrets.SONAR_TOKEN_COMMONS }} | ||
|
||
- name: Publish Spring | ||
working-directory: ./spring | ||
run: | | ||
mvn versions:use-dep-version -DdepVersion=${{ needs.pr-validation.outputs.version }}.PR${{ github.event.number }} -Dincludes=ca.bc.gov.nrs-commons:forest-client-core -DforceVersion=true --file pom.xml | ||
mvn versions:set -DnewVersion='${{ needs.pr-validation.outputs.version }}.PR${{ github.event.number }}' -DskipTests -Dtests.skip=true --file pom.xml | ||
mvn versions:commit --file pom.xml | ||
mvn -B source:jar deploy --file pom.xml | ||
uses: paulushcgcj/[email protected] | ||
with: | ||
commands: mvn versions:use-dep-version -DdepVersion=${{ needs.pr-validation.outputs.version }}.PR${{ github.event.number }} -Dincludes=ca.bc.gov.nrs-commons:forest-client-core -DforceVersion=true --file pom.xml | ||
dir: spring | ||
app-version: ${{ needs.pr-validation.outputs.version }}.PR${{ github.event.number }} | ||
extra-params: -DskipTests -Dtests.skip=true | ||
add-sources: true | ||
add-javadoc: true | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} |
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
27 changes: 17 additions & 10 deletions
27
core/src/main/java/ca/bc/gov/app/dto/ValidationError.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 |
---|---|---|
@@ -1,16 +1,23 @@ | ||
package ca.bc.gov.app.dto; | ||
|
||
import java.io.Serializable; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.With; | ||
|
||
@Data | ||
@Schema( | ||
description = "Represents a validation error during submission", | ||
title = "ValidationError", | ||
example = """ | ||
{ | ||
"fieldId": "person.name", | ||
"errorMsg": "Name is required" | ||
}""" | ||
) | ||
@With | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class ValidationError implements Serializable { | ||
private String fieldId; | ||
private String errorMsg; | ||
public record ValidationError( | ||
@Schema(description = "The field id that failed validation", example = "person.name") | ||
String fieldId, | ||
@Schema(description = "The error message for that specific field", example = "Name is required") | ||
String errorMsg | ||
) { | ||
|
||
} |
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
Oops, something went wrong.