Skip to content

Commit 6cdbc9b

Browse files
author
Rob Tjalma
committed
Housekeeping
Signed-off-by: Rob Tjalma <[email protected]>
1 parent f5d533c commit 6cdbc9b

File tree

282 files changed

+351
-2949
lines changed

Some content is hidden

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

282 files changed

+351
-2949
lines changed

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-FileCopyrightText: 2021 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
#
6+
# https://help.github.com/articles/dealing-with-line-endings/
7+
#
8+
# These are explicitly windows files and should use crlf
9+
*.bat text eol=crlf
10+
*.cmd text eol=crlf
11+

.github/dependabot.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# SPDX-FileCopyrightText: 2021 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
30+
ignore:
31+
# Next two dependencies shouldn't be upgrade, because Quarkus isn't using newer version of EL.
32+
- dependency-name: org.hibernate.validator:hibernate-validator
33+
versions: [ "[7.0,)" ]
34+
- dependency-name: org.glassfish:jakarta.el
35+
versions: [ "[4.0,)" ]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# SPDX-FileCopyrightText: 2021 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 ]
8+
9+
jobs:
10+
github-actions-automate-projects:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: add-new-issues-to-repository-based-project-column
14+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
15+
if: github.event_name == 'issues' && github.event.action == 'opened'
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GITHUB_PROJECT_URL: https://github.com/com-pas/compas-scl-auto-alignment/projects/2
19+
GITHUB_PROJECT_COLUMN_NAME: To do
20+
- name: add-new-pull-request-to-repository-based-project-column
21+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
22+
if: github.event_name == 'pull_request' && github.event.action == 'opened'
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
GITHUB_PROJECT_URL: https://github.com/com-pas/compas-scl-auto-alignment/projects/2
26+
GITHUB_PROJECT_COLUMN_NAME: To do
27+
- name: add-new-issues-to-organization-based-project-column
28+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
29+
if: github.event_name == 'issues' && github.event.action == 'opened'
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
32+
GITHUB_PROJECT_URL: https://github.com/orgs/com-pas/projects/1
33+
GITHUB_PROJECT_COLUMN_NAME: To do
34+
- name: add-new-pull-request-to-organization-based-project-column
35+
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
36+
if: github.event_name == 'pull_request' && github.event.action == 'opened'
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
39+
GITHUB_PROJECT_URL: https://github.com/orgs/com-pas/projects/2
40+
GITHUB_PROJECT_COLUMN_NAME: To do
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# SPDX-FileCopyrightText: 2021 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+
- '!main'
12+
- '!develop'
13+
pull_request:
14+
branches:
15+
- 'main'
16+
- 'develop'
17+
18+
jobs:
19+
build:
20+
name: Build
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 15
23+
24+
steps:
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
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# SPDX-FileCopyrightText: 2021 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+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- name: Set up Docker Buildx
19+
id: buildx
20+
uses: docker/setup-buildx-action@v1
21+
- name: Login to Docker Hub
22+
uses: docker/login-action@v1
23+
with:
24+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
25+
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+
38+
- name: Extract tag name
39+
id: extract_tagname
40+
shell: bash
41+
# Extra the tagname form the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
42+
run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})"
43+
- name: Set up JDK 1.11
44+
uses: actions/[email protected]
45+
with:
46+
distribution: 'zulu'
47+
java-version: '11'
48+
49+
- name: Create custom Maven Settings.xml
50+
uses: whelk-io/maven-settings-xml-action@v20
51+
with:
52+
output_file: custom_maven_settings.xml
53+
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
54+
- name: Set version with Maven
55+
run: ./mvnw -B versions:set -DprocessAllModules=true -DnewVersion=${{ steps.extract_tagname.outputs.tagname }}
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
- name: Deploy with Maven to GitHub Packages and Docker Hub
59+
run: ./mvnw -B -s custom_maven_settings.xml -Prelease,native clean deploy
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/reuse.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-FileCopyrightText: 2021 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+
- uses: actions/checkout@v2
14+
- name: REUSE Compliance Check
15+
uses: fsfe/reuse-action@v1
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# SPDX-FileCopyrightText: 2021 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+
- '!main'
12+
- '!develop'
13+
pull_request:
14+
branches:
15+
- 'main'
16+
- 'develop'
17+
18+
jobs:
19+
build:
20+
name: Build
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 15
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Set up JDK 1.11
30+
uses: actions/[email protected]
31+
with:
32+
distribution: 'zulu'
33+
java-version: '11'
34+
- name: Cache SonarCloud packages
35+
uses: actions/[email protected]
36+
with:
37+
path: ~/.sonar/cache
38+
key: ${{ runner.os }}-sonar
39+
restore-keys: ${{ runner.os }}-sonar
40+
- name: Cache Maven packages
41+
uses: actions/[email protected]
42+
with:
43+
path: ~/.m2
44+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
45+
restore-keys: ${{ runner.os }}-m2
46+
47+
- name: Create custom Maven Settings.xml
48+
uses: whelk-io/maven-settings-xml-action@v20
49+
with:
50+
output_file: custom_maven_settings.xml
51+
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
52+
- name: Build and analyze
53+
env:
54+
GITHUB_USERNAME: "OWNER"
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
57+
run: |
58+
./mvnw -s custom_maven_settings.xml -B -Psonar \
59+
-Dsonar.projectKey=com-pas_compas-scl-auto-alignment \
60+
-Dsonar.organization=com-pas \
61+
-Dsonar.host.url=https://sonarcloud.io \
62+
clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar

.gitignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# SPDX-FileCopyrightText: 2021 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Compiled class file
6+
*.class
7+
8+
# Log file
9+
*.log
10+
11+
# BlueJ files
12+
*.ctxt
13+
14+
# Mobile Tools for Java (J2ME)
15+
.mtj.tmp/
16+
17+
# Package Files #
18+
*.jar
19+
*.war
20+
*.nar
21+
*.ear
22+
*.zip
23+
*.tar.gz
24+
*.rar
25+
26+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
27+
hs_err_pid*
28+
29+
# Alliander specific
30+
oc
31+
32+
# Gradle stuff
33+
.gradle
34+
**/build/
35+
!src/**/build/
36+
37+
# Ignore Gradle GUI config
38+
gradle-app.setting
39+
40+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
41+
!gradle-wrapper.jar
42+
43+
# Cache of project
44+
.gradletasknamecache
45+
46+
# IDE specific
47+
.vscode/
48+
.idea
49+
50+
# General
51+
.DS_Store
52+
target
53+
*.iml
54+
.settings
55+
.project
56+
.classpath
57+
out
58+
lib
59+
bin
60+
.java-version
61+
*.orig
62+
*.rej
63+
*.swp
64+
*.swo
65+
.cache
66+
build
67+
68+
# Quarkus specific
69+
quarkus.log

0 commit comments

Comments
 (0)