Skip to content

Commit a6c6a63

Browse files
author
Dennis Labordus
authored
Merge pull request #34 from com-pas/develop
New release
2 parents f73f28f + 0ce9698 commit a6c6a63

File tree

83 files changed

+4262
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+4262
-14
lines changed

.github/dependabot.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# SPDX-FileCopyrightText: 2022 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
version: 2
6+
7+
registries:
8+
maven-github:
9+
type: maven-repository
10+
url: https://maven.pkg.github.com/com-pas/*
11+
username: OWNER
12+
password: ${{ secrets.DB_GITHUB_PACKAGES }}
13+
14+
updates:
15+
# Maintain dependencies for GitHub Actions
16+
- package-ecosystem: "github-actions"
17+
directory: "/"
18+
schedule:
19+
interval: "daily"
20+
open-pull-requests-limit: 5
21+
22+
# Maintain dependencies for Maven
23+
- package-ecosystem: "maven"
24+
directory: "/"
25+
registries:
26+
- maven-github
27+
schedule:
28+
interval: "daily"
29+
open-pull-requests-limit: 5

.github/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# SPDX-FileCopyrightText: 2022 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
changelog:
6+
exclude:
7+
labels:
8+
- wontfix
9+
- duplicate
10+
- invalid
11+
- ignore
12+
categories:
13+
- title: New Features
14+
labels:
15+
- enhancement
16+
- title: Bugfixes
17+
labels:
18+
- bug
19+
- title: Tooling changes
20+
labels:
21+
- tooling
22+
- title: Dependency updates
23+
labels:
24+
- dependencies
25+
- title: Other Changes
26+
labels:
27+
- "*"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SPDX-FileCopyrightText: 2022 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: Add issues and pull request to project boards
6+
7+
on: [ issues, pull_request, pull_request_target ]
8+
9+
jobs:
10+
github-actions-automate-projects:
11+
runs-on: ubuntu-latest
12+
13+
if: ${{ (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }}
14+
steps:
15+
- name: add-new-issues-to-repository-based-project-column
16+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
17+
if: github.event_name == 'issues' && github.event.action == 'opened'
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
GITHUB_PROJECT_URL: https://github.com/com-pas/compas-scl-validator/projects/1
21+
GITHUB_PROJECT_COLUMN_NAME: To do
22+
- name: add-new-pull-request-to-repository-based-project-column
23+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
24+
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action == 'opened'
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
GITHUB_PROJECT_URL: https://github.com/com-pas/compas-scl-validator/projects/1
28+
GITHUB_PROJECT_COLUMN_NAME: To do
29+
- name: add-new-issues-to-organization-based-project-column
30+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
31+
if: github.event_name == 'issues' && github.event.action == 'opened'
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
34+
GITHUB_PROJECT_URL: https://github.com/orgs/com-pas/projects/1
35+
GITHUB_PROJECT_COLUMN_NAME: To do
36+
- name: add-new-pull-request-to-organization-based-project-column
37+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
38+
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action == 'opened'
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
41+
GITHUB_PROJECT_URL: https://github.com/orgs/com-pas/projects/2
42+
GITHUB_PROJECT_COLUMN_NAME: To do
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# SPDX-FileCopyrightText: 2022 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: Build Project
6+
7+
on:
8+
push:
9+
branches:
10+
- '**'
11+
pull_request:
12+
branches:
13+
- 'main'
14+
- 'develop'
15+
16+
jobs:
17+
build:
18+
name: Build
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 15
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v3
25+
with:
26+
submodules: 'true'
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@v3
32+
with:
33+
path: /tmp/.buildx-cache
34+
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
35+
- name: Cache Maven packages
36+
uses: actions/cache@v3
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/setup-java@v3
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 with Maven
54+
run: ./mvnw -s custom_maven_settings.xml -B clean verify
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# SPDX-FileCopyrightText: 2022 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: Release Project
6+
7+
on:
8+
release:
9+
types: [released]
10+
11+
jobs:
12+
push_to_registry:
13+
name: Build and publish
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
with:
20+
submodules: 'true'
21+
- name: Set up Docker Buildx
22+
id: buildx
23+
uses: docker/setup-buildx-action@v1
24+
- name: Login to Docker Hub
25+
uses: docker/login-action@v1
26+
with:
27+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
28+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
29+
- name: Cache Docker Register
30+
uses: actions/cache@v3
31+
with:
32+
path: /tmp/.buildx-cache
33+
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
34+
- name: Cache Maven packages
35+
uses: actions/cache@v3
36+
with:
37+
path: ~/.m2
38+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
39+
restore-keys: ${{ runner.os }}-m2
40+
41+
- name: Extract tag name
42+
id: extract_tagname
43+
shell: bash
44+
# Extra the tagname form the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
45+
run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})"
46+
- name: Set up JDK 1.11
47+
uses: actions/setup-java@v3
48+
with:
49+
distribution: 'zulu'
50+
java-version: '11'
51+
52+
- name: Create custom Maven Settings.xml
53+
uses: whelk-io/maven-settings-xml-action@v20
54+
with:
55+
output_file: custom_maven_settings.xml
56+
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
57+
- name: Set version with Maven
58+
run: ./mvnw -B versions:set -DprocessAllModules=true -DnewVersion=${{ steps.extract_tagname.outputs.tagname }}
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
- name: Deploy with Maven to GitHub Packages and Docker Hub
62+
run: ./mvnw -B -s custom_maven_settings.xml -Prelease clean deploy
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/reuse.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# SPDX-FileCopyrightText: 2022 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: REUSE Compliance Check
6+
7+
on: push
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
- name: REUSE Compliance Check
16+
uses: fsfe/reuse-action@v1
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# SPDX-FileCopyrightText: 2022 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: SonarCloud Analysis
6+
7+
on:
8+
push:
9+
branches:
10+
- '**'
11+
pull_request:
12+
branches:
13+
- 'main'
14+
- 'develop'
15+
pull_request_target:
16+
branches:
17+
- 'main'
18+
- 'develop'
19+
20+
jobs:
21+
build:
22+
name: SonarCloud
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 15
25+
26+
if: ${{ (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }}
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v3
30+
with:
31+
fetch-depth: 0
32+
submodules: 'true'
33+
34+
- name: Set up JDK 1.11
35+
uses: actions/setup-java@v3
36+
with:
37+
distribution: 'zulu'
38+
java-version: '11'
39+
- name: Cache SonarCloud packages
40+
uses: actions/cache@v3
41+
with:
42+
path: ~/.sonar/cache
43+
key: ${{ runner.os }}-sonar
44+
restore-keys: ${{ runner.os }}-sonar
45+
- name: Cache Maven packages
46+
uses: actions/cache@v3
47+
with:
48+
path: ~/.m2
49+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
50+
restore-keys: ${{ runner.os }}-m2
51+
52+
- name: Create custom Maven Settings.xml
53+
uses: whelk-io/maven-settings-xml-action@v20
54+
with:
55+
output_file: custom_maven_settings.xml
56+
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
57+
- name: Build and analyze
58+
env:
59+
GITHUB_USERNAME: "OWNER"
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
62+
run: |
63+
./mvnw -s custom_maven_settings.xml -B -Psonar \
64+
-Dsonar.projectKey=com-pas_compas-scl-validator \
65+
-Dsonar.organization=com-pas \
66+
-Dsonar.host.url=https://sonarcloud.io \
67+
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} \
68+
clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar

.gitmodules

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SPDX-FileCopyrightText: 2022 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
#
6+
# Remark: the option to ignore 'untracked' files is needed, because the submodules don't contain a file '.gitignore'.
7+
# This cause the target directories to be untracked.
8+
#
9+
[submodule "riseclipse/riseclipse-developer"]
10+
path = riseclipse/riseclipse-developer
11+
url = [email protected]:riseclipse/riseclipse-developer.git
12+
ignore = dirty
13+
[submodule "riseclipse/riseclipse-main"]
14+
path = riseclipse/riseclipse-main
15+
url = [email protected]:riseclipse/riseclipse-main.git
16+
ignore = dirty
17+
[submodule "riseclipse/riseclipse-metamodel-scl2003"]
18+
path = riseclipse/riseclipse-metamodel-scl2003
19+
url = [email protected]:riseclipse/riseclipse-metamodel-scl2003.git
20+
ignore = dirty
21+
[submodule "riseclipse/riseclipse-ocl-constraints-scl2003"]
22+
path = riseclipse/riseclipse-ocl-constraints-scl2003
23+
url = [email protected]:riseclipse/riseclipse-ocl-constraints-scl2003.git
24+
ignore = dirty

0 commit comments

Comments
 (0)