Skip to content

Commit

Permalink
Merge pull request #163 from com-pas/develop
Browse files Browse the repository at this point in the history
New Release
  • Loading branch information
juancho0202 authored Sep 8, 2022
2 parents 4da16ff + d955d8a commit df6dafb
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 Alliander N.V.
# SPDX-FileCopyrightText: 2022 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0

Expand Down
36 changes: 11 additions & 25 deletions .github/workflows/automate-projects.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 Alliander N.V.
# SPDX-FileCopyrightText: 2022 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -12,31 +12,17 @@ jobs:

if: ${{ (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }}
steps:
- name: add-new-issues-to-repository-based-project-column
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
if: github.event_name == 'issues' && github.event.action == 'opened'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PROJECT_URL: https://github.com/com-pas/compas-core/projects/2
GITHUB_PROJECT_COLUMN_NAME: To do
- name: add-new-pull-request-to-repository-based-project-column
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action == 'opened'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PROJECT_URL: https://github.com/com-pas/compas-core/projects/2
GITHUB_PROJECT_COLUMN_NAME: To do
- name: add-new-issues-to-organization-based-project-column
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
if: github.event_name == 'issues' && github.event.action == 'opened'
env:
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
GITHUB_PROJECT_URL: https://github.com/orgs/com-pas/projects/1
GITHUB_PROJECT_COLUMN_NAME: To do
uses: alex-page/github-project-automation-plus@v0.8.1
with:
project: CoMPAS Issues Overview Board
column: To do
repo-token: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
- name: add-new-pull-request-to-organization-based-project-column
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action == 'opened'
env:
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
GITHUB_PROJECT_URL: https://github.com/orgs/com-pas/projects/2
GITHUB_PROJECT_COLUMN_NAME: To do
uses: alex-page/github-project-automation-plus@v0.8.1
with:
project: CoMPAS Pull Request Overview Board
column: To do
repo-token: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
7 changes: 5 additions & 2 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 Alliander N.V.
# SPDX-FileCopyrightText: 2022 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -20,12 +20,15 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK 1.11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'

- name: Create custom Maven Settings.xml
uses: whelk-io/maven-settings-xml-action@v20
with:
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release-project.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 Alliander N.V.
# SPDX-FileCopyrightText: 2022 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -15,17 +15,21 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Extract tag name
id: extract_tagname
shell: bash
# Extra the tagname form the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
# Extract the tag name from the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})"

- name: Set up JDK 1.11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'

- name: Create custom Maven Settings.xml
uses: whelk-io/maven-settings-xml-action@v20
with:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 RTE FRANCE
# SPDX-FileCopyrightText: 2022 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -10,6 +10,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
- name: Checkout
uses: actions/checkout@v3
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
46 changes: 34 additions & 12 deletions .github/workflows/sonarcloud-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 RTE FRANCE
# SPDX-FileCopyrightText: 2022 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -25,14 +25,11 @@ jobs:

if: ${{ (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }}
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 1.11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'

- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
Expand All @@ -45,19 +42,44 @@ jobs:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Set up JDK 1.11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'

- name: Set Common Sonar Variables
id: sonar_env
run: |
echo "##[set-output name=sonar_opts;]$(echo -Dsonar.host.url=https://sonarcloud.io \
-Dsonar.projectKey=com-pas_compas-core \
-Dsonar.organization=com-pas )"
- name: Create custom Maven Settings.xml
uses: whelk-io/maven-settings-xml-action@v20
with:
output_file: custom_maven_settings.xml
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
- name: Build and analyze
- name: Build and analyze (Pull Request)
if: ${{ github.event_name == 'pull_request' || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
./mvnw -B -s custom_maven_settings.xml -Psonar \
-Dsonar.projectKey=com-pas_compas-core \
-Dsonar.organization=com-pas \
-Dsonar.host.url=https://sonarcloud.io \
${{ steps.sonar_env.outputs.sonar_opts }} \
-Dsonar.pullrequest.branch=${{ github.ref_name }} \
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} \
verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
-Dsonar.pullrequest.base=${{ github.base_ref }} \
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} \
clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
- name: Build and analyze (Push)
if: ${{ github.event_name == 'push' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
./mvnw -B -s custom_maven_settings.xml -Psonar \
${{ steps.sonar_env.outputs.sonar_opts }} \
-Dsonar.branch.name=${{ github.ref_name }} \
clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ SPDX-License-Identifier: Apache-2.0
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<compas.scl.xsd.version>0.0.4</compas.scl.xsd.version>
<quarkus.platform.version>2.10.0.Final</quarkus.platform.version>
<slf4j.version>1.7.36</slf4j.version>
<quarkus.platform.version>2.12.1.Final</quarkus.platform.version>
<slf4j.version>2.0.0</slf4j.version>
<jaxb.bind.version>2.3.6</jaxb.bind.version>
<openpojo.version>0.9.1</openpojo.version>
</properties>
Expand Down Expand Up @@ -236,7 +236,7 @@ SPDX-License-Identifier: Apache-2.0
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down
26 changes: 25 additions & 1 deletion scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ SPDX-License-Identifier: Apache-2.0
Version 1.0 Release 2021/06/16
Version 1.1 Release 2022/01/21
Version 1.2 Release 2022/06/08
Version 1.3 Release 2022/09/08
</xs:documentation>
</xs:annotation>

Expand All @@ -24,7 +25,9 @@ SPDX-License-Identifier: Apache-2.0
<xs:annotation>
<xs:documentation>Name of the SCL configuration, extension excluded</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:normalizedString"/>
<xs:restriction base="xs:normalizedString">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>

<!--
Expand Down Expand Up @@ -78,6 +81,25 @@ SPDX-License-Identifier: Apache-2.0
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="tCompasLabel">
<xs:annotation>
<xs:documentation>Label added to the SCL File to filter on</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:normalizedString">
<xs:minLength value="1"/>
<xs:pattern value="[A-Za-z][0-9A-Za-z_-]*"/>
</xs:restriction>
</xs:simpleType>

<xs:complexType name="tCompasLabels">
<xs:annotation>
<xs:documentation>List of Labels belonging to the SCL File to filter on with a maximum number</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Label" type="tCompasLabel" minOccurs="0" maxOccurs="20"/>
</xs:sequence>
</xs:complexType>

<xs:simpleType name="tCompasIEDType">
<xs:annotation>
<xs:documentation xml:lang="en">
Expand Down Expand Up @@ -281,6 +303,8 @@ SPDX-License-Identifier: Apache-2.0

<xs:element name="SclName" type="tCompasSclName"/>
<xs:element name="SclFileType" type="tCompasSclFileType"/>
<xs:element name="Labels" type="tCompasLabels"/>

<xs:element name="Flow" type="tCompasFlow"/>
<xs:element name="Bay" type="tCompasBay"/>
<xs:element name="LDevice" type="tCompasLDevice"/>
Expand Down

0 comments on commit df6dafb

Please sign in to comment.