Skip to content

Commit 8e5a484

Browse files
author
Dennis Labordus
authored
Merge pull request #138 from com-pas/develop
New release
2 parents 7b81bf8 + 650a437 commit 8e5a484

File tree

22 files changed

+173
-39
lines changed

22 files changed

+173
-39
lines changed

.github/workflows/build-project.yml

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@
44

55
name: Build Project
66

7-
on: push
7+
on:
8+
push:
9+
branches:
10+
- '**'
11+
- '!main'
12+
- '!develop'
13+
pull_request:
14+
branches:
15+
- 'main'
16+
- 'develop'
817

918
jobs:
1019
build:
@@ -13,16 +22,37 @@ jobs:
1322
timeout-minutes: 15
1423

1524
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up JDK 1.11
18-
uses: actions/[email protected]
19-
with:
20-
distribution: 'zulu'
21-
java-version: '11'
22-
- name: Create custom Maven Settings.xml
23-
uses: whelk-io/maven-settings-xml-action@v20
24-
with:
25-
output_file: custom_maven_settings.xml
26-
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
27-
- name: Build with Maven
28-
run: ./mvnw -s custom_maven_settings.xml -B clean verify -Pnative
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
- name: Set up Docker Buildx
28+
id: buildx
29+
uses: docker/setup-buildx-action@v1
30+
- name: Cache Docker Register
31+
uses: actions/cache@v2
32+
with:
33+
path: /tmp/.buildx-cache
34+
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
35+
- name: Cache Maven packages
36+
uses: actions/[email protected]
37+
with:
38+
path: ~/.m2
39+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
40+
restore-keys: ${{ runner.os }}-m2
41+
42+
- name: Set up JDK 1.11
43+
uses: actions/[email protected]
44+
with:
45+
distribution: 'zulu'
46+
java-version: '11'
47+
48+
- name: Create custom Maven Settings.xml
49+
uses: whelk-io/maven-settings-xml-action@v20
50+
with:
51+
output_file: custom_maven_settings.xml
52+
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
53+
- name: Build Native with Maven
54+
if: ${{ github.event_name == 'pull_request' }}
55+
run: ./mvnw -s custom_maven_settings.xml -B clean verify -Pnative
56+
- name: Build with Maven
57+
if: ${{ github.event_name == 'push' }}
58+
run: ./mvnw -s custom_maven_settings.xml -B clean verify

.github/workflows/release-project.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,28 @@ jobs:
1313
name: Build and publish
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- name: Set up Docker Buildx
19+
id: buildx
20+
uses: docker/setup-buildx-action@v1
1721
- name: Login to Docker Hub
1822
uses: docker/login-action@v1
1923
with:
2024
username: ${{ secrets.DOCKER_HUB_USERNAME }}
2125
password: ${{ secrets.DOCKER_HUB_TOKEN }}
26+
- name: Cache Docker Register
27+
uses: actions/cache@v2
28+
with:
29+
path: /tmp/.buildx-cache
30+
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
31+
- name: Cache Maven packages
32+
uses: actions/[email protected]
33+
with:
34+
path: ~/.m2
35+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
36+
restore-keys: ${{ runner.os }}-m2
37+
2238
- name: Extract tag name
2339
id: extract_tagname
2440
shell: bash
@@ -29,6 +45,7 @@ jobs:
2945
with:
3046
distribution: 'zulu'
3147
java-version: '11'
48+
3249
- name: Create custom Maven Settings.xml
3350
uses: whelk-io/maven-settings-xml-action@v20
3451
with:

.github/workflows/sonarcloud-analysis.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@
44

55
name: SonarCloud Analysis
66

7-
on: push
7+
on:
8+
push:
9+
branches:
10+
- '**'
11+
- '!main'
12+
- '!develop'
13+
pull_request:
14+
branches:
15+
- 'main'
16+
- 'develop'
817

918
jobs:
1019
build:
@@ -13,9 +22,11 @@ jobs:
1322
timeout-minutes: 15
1423

1524
steps:
16-
- uses: actions/checkout@v2
25+
- name: Checkout
26+
uses: actions/checkout@v2
1727
with:
1828
fetch-depth: 0
29+
1930
- name: Set up JDK 11
2031
uses: actions/[email protected]
2132
with:
@@ -33,6 +44,7 @@ jobs:
3344
path: ~/.m2
3445
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3546
restore-keys: ${{ runner.os }}-m2
47+
3648
- name: Create custom Maven Settings.xml
3749
uses: whelk-io/maven-settings-xml-action@v20
3850
with:

app/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SPDX-License-Identifier: Apache-2.0
1818
<packaging>jar</packaging>
1919

2020
<properties>
21-
<quarkus.platform.version>2.3.0.Final</quarkus.platform.version>
21+
<quarkus.platform.version>2.4.1.Final</quarkus.platform.version>
2222

2323
<quarkus.container-image.group>lfenergy</quarkus.container-image.group>
2424
<quarkus.container-image.name>compas-scl-data-service</quarkus.container-image.name>

app/src/main/java/org/lfenergy/compas/scl/data/rest/v1/model/CreateRequest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import static org.lfenergy.compas.scl.data.SclDataServiceConstants.SCL_DATA_SERVICE_V1_NS_URI;
1616

17-
@Schema(description = "A request to create a new entry in the database containing the SCL Element content.")
17+
@Schema(description = "Request to create a new entry in the database containing the SCL Element content.")
1818
@XmlRootElement(name = "CreateRequest", namespace = SCL_DATA_SERVICE_V1_NS_URI)
1919
@XmlAccessorType(XmlAccessType.FIELD)
2020
public class CreateRequest {
@@ -24,10 +24,12 @@ public class CreateRequest {
2424
@XmlElement(name = "Name", namespace = SCL_DATA_SERVICE_V1_NS_URI, required = true)
2525
private String name;
2626

27-
@Schema(description = "Comment that will be added to the new history record.")
27+
@Schema(description = "Comment that will be added to the new history record.", example = "New substation configuration for X")
2828
@XmlElement(name = "Comment", namespace = SCL_DATA_SERVICE_V1_NS_URI)
2929
private String comment;
3030

31+
@Schema(description = "The XML Content of the SCL added as CDATA. The content should contain a XML according to the IEC 61850 standard.",
32+
example = "<![CDATA[<SCL xmlns=\"http://www.iec.ch/61850/2003/SCL\">....</SCL>]]")
3133
@XmlElement(name = "SclData", namespace = SCL_DATA_SERVICE_V1_NS_URI)
3234
private String sclData;
3335

app/src/main/java/org/lfenergy/compas/scl/data/rest/v1/model/CreateResponse.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,21 @@
33
// SPDX-License-Identifier: Apache-2.0
44
package org.lfenergy.compas.scl.data.rest.v1.model;
55

6+
import org.eclipse.microprofile.openapi.annotations.media.Schema;
7+
68
import javax.xml.bind.annotation.XmlAccessType;
79
import javax.xml.bind.annotation.XmlAccessorType;
810
import javax.xml.bind.annotation.XmlElement;
911
import javax.xml.bind.annotation.XmlRootElement;
1012

1113
import static org.lfenergy.compas.scl.data.SclDataServiceConstants.SCL_DATA_SERVICE_V1_NS_URI;
1214

15+
@Schema(description = "Response from creating a new entry in the database containing the SCL Element content.")
1316
@XmlRootElement(name = "CreateResponse", namespace = SCL_DATA_SERVICE_V1_NS_URI)
1417
@XmlAccessorType(XmlAccessType.FIELD)
1518
public class CreateResponse {
19+
@Schema(description = "The XML Content of the updated SCL added to the database. The content contains a XML according to the IEC 61850 standard.",
20+
example = "<![CDATA[<SCL xmlns=\"http://www.iec.ch/61850/2003/SCL\">....</SCL>]]")
1621
@XmlElement(name = "SclData", namespace = SCL_DATA_SERVICE_V1_NS_URI, required = true)
1722
private String sclData;
1823

app/src/main/java/org/lfenergy/compas/scl/data/rest/v1/model/GetResponse.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,21 @@
44

55
package org.lfenergy.compas.scl.data.rest.v1.model;
66

7+
import org.eclipse.microprofile.openapi.annotations.media.Schema;
8+
79
import javax.xml.bind.annotation.XmlAccessType;
810
import javax.xml.bind.annotation.XmlAccessorType;
911
import javax.xml.bind.annotation.XmlElement;
1012
import javax.xml.bind.annotation.XmlRootElement;
1113

1214
import static org.lfenergy.compas.scl.data.SclDataServiceConstants.SCL_DATA_SERVICE_V1_NS_URI;
1315

16+
@Schema(description = "Response from retrieving a SCL from the database containing the SCL Content.")
1417
@XmlRootElement(name = "GetResponse", namespace = SCL_DATA_SERVICE_V1_NS_URI)
1518
@XmlAccessorType(XmlAccessType.FIELD)
1619
public class GetResponse {
20+
@Schema(description = "The XML Content of the retrieved SCL from the database. The content contains a XML according to the IEC 61850 standard.",
21+
example = "<![CDATA[<SCL xmlns=\"http://www.iec.ch/61850/2003/SCL\">....</SCL>]]")
1722
@XmlElement(name = "SclData", namespace = SCL_DATA_SERVICE_V1_NS_URI, required = true)
1823
private String sclData;
1924

app/src/main/java/org/lfenergy/compas/scl/data/rest/v1/model/ListResponse.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// SPDX-License-Identifier: Apache-2.0
44
package org.lfenergy.compas.scl.data.rest.v1.model;
55

6+
import org.eclipse.microprofile.openapi.annotations.media.Schema;
67
import org.lfenergy.compas.scl.data.model.Item;
78

89
import javax.xml.bind.annotation.XmlAccessType;
@@ -13,9 +14,11 @@
1314

1415
import static org.lfenergy.compas.scl.data.SclDataServiceConstants.SCL_DATA_SERVICE_V1_NS_URI;
1516

17+
@Schema(description = "Response from retrieving a all SCL Meta Information for a SCL Type or all versions of a SCL.")
1618
@XmlRootElement(name = "ListResponse", namespace = SCL_DATA_SERVICE_V1_NS_URI)
1719
@XmlAccessorType(XmlAccessType.FIELD)
1820
public class ListResponse {
21+
@Schema(description = "List of found SCL Entries in the database.")
1922
@XmlElement(name = "Item", namespace = SCL_DATA_SERVICE_V1_NS_URI)
2023
private List<Item> items;
2124

app/src/main/java/org/lfenergy/compas/scl/data/rest/v1/model/Type.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,22 @@
33
// SPDX-License-Identifier: Apache-2.0
44
package org.lfenergy.compas.scl.data.rest.v1.model;
55

6+
import org.eclipse.microprofile.openapi.annotations.media.Schema;
7+
68
import javax.xml.bind.annotation.XmlAccessType;
79
import javax.xml.bind.annotation.XmlAccessorType;
810
import javax.xml.bind.annotation.XmlElement;
911

1012
import static org.lfenergy.compas.scl.data.SclDataServiceConstants.SCL_DATA_SERVICE_V1_NS_URI;
1113

14+
@Schema(description = "Describing a type of SCL.")
1215
@XmlAccessorType(XmlAccessType.FIELD)
1316
public class Type {
17+
@Schema(description = "The code of the SCL Type.", example = "SCD")
1418
@XmlElement(name = "Code", namespace = SCL_DATA_SERVICE_V1_NS_URI)
1519
private String code;
20+
21+
@Schema(description = "The description of the SCL Type.", example = "Substation Configuration Description")
1622
@XmlElement(name = "Description", namespace = SCL_DATA_SERVICE_V1_NS_URI)
1723
private String description;
1824

app/src/main/java/org/lfenergy/compas/scl/data/rest/v1/model/TypeListResponse.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// SPDX-License-Identifier: Apache-2.0
44
package org.lfenergy.compas.scl.data.rest.v1.model;
55

6+
import org.eclipse.microprofile.openapi.annotations.media.Schema;
7+
68
import javax.xml.bind.annotation.XmlAccessType;
79
import javax.xml.bind.annotation.XmlAccessorType;
810
import javax.xml.bind.annotation.XmlElement;
@@ -12,9 +14,11 @@
1214

1315
import static org.lfenergy.compas.scl.data.SclDataServiceConstants.SCL_DATA_SERVICE_V1_NS_URI;
1416

17+
@Schema(description = "Response with the List of SCL Types.")
1518
@XmlRootElement(name = "TypeListResponse", namespace = SCL_DATA_SERVICE_V1_NS_URI)
1619
@XmlAccessorType(XmlAccessType.FIELD)
1720
public class TypeListResponse {
21+
@Schema(description = "List of SCL Types.")
1822
@XmlElement(name = "Type", namespace = SCL_DATA_SERVICE_V1_NS_URI)
1923
private List<Type> types = new ArrayList<>();
2024

0 commit comments

Comments
 (0)