diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4f72716..0b1575c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021 Alliander N.V. +# SPDX-FileCopyrightText: 2022 Alliander N.V. # # SPDX-License-Identifier: Apache-2.0 diff --git a/.github/workflows/automate-projects.yml b/.github/workflows/automate-projects.yml index 8c8449c..3c61af0 100644 --- a/.github/workflows/automate-projects.yml +++ b/.github/workflows/automate-projects.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021 Alliander N.V. +# SPDX-FileCopyrightText: 2022 Alliander N.V. # # SPDX-License-Identifier: Apache-2.0 @@ -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 }} diff --git a/.github/workflows/build-project.yml b/.github/workflows/build-project.yml index 888b90a..0926958 100644 --- a/.github/workflows/build-project.yml +++ b/.github/workflows/build-project.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021 Alliander N.V. +# SPDX-FileCopyrightText: 2022 Alliander N.V. # # SPDX-License-Identifier: Apache-2.0 @@ -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: diff --git a/.github/workflows/release-project.yml b/.github/workflows/release-project.yml index a4b729d..d70c768 100644 --- a/.github/workflows/release-project.yml +++ b/.github/workflows/release-project.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021 Alliander N.V. +# SPDX-FileCopyrightText: 2022 Alliander N.V. # # SPDX-License-Identifier: Apache-2.0 @@ -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/. + # Extract the tag name from the git reference, value of GITHUB_REF will be something like refs/tags/. 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: diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index ea657bb..9ebd56d 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021 RTE FRANCE +# SPDX-FileCopyrightText: 2022 Alliander N.V. # # SPDX-License-Identifier: Apache-2.0 @@ -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 diff --git a/.github/workflows/sonarcloud-analysis.yml b/.github/workflows/sonarcloud-analysis.yml index 97ea202..3d28c55 100644 --- a/.github/workflows/sonarcloud-analysis.yml +++ b/.github/workflows/sonarcloud-analysis.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021 RTE FRANCE +# SPDX-FileCopyrightText: 2022 Alliander N.V. # # SPDX-License-Identifier: Apache-2.0 @@ -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: @@ -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 diff --git a/pom.xml b/pom.xml index 3473b91..2d51130 100644 --- a/pom.xml +++ b/pom.xml @@ -20,8 +20,8 @@ SPDX-License-Identifier: Apache-2.0 UTF-8 0.0.4 - 2.10.0.Final - 1.7.36 + 2.12.1.Final + 2.0.0 2.3.6 0.9.1 @@ -236,7 +236,7 @@ SPDX-License-Identifier: Apache-2.0 org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs diff --git a/scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd b/scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd index 140c067..a648c67 100644 --- a/scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd +++ b/scl-extension/src/main/resources/xsd/SCL_CoMPAS.xsd @@ -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 @@ -24,7 +25,9 @@ SPDX-License-Identifier: Apache-2.0 Name of the SCL configuration, extension excluded - + + +