Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ariwk authored May 23, 2024
0 parents commit 6fcb60e
Show file tree
Hide file tree
Showing 23 changed files with 919 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These owners will be the default owners for everything in the repo.
# Unless a later match takes precedence, global owners will be requested for review when someone opens a pull request.
* @SchweizerischeBundesbahnen/SBB-CLEW-WZU-POLARION
63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
name: Bug report
description: File a new bug
labels: [bug, triage]
body:
- type: markdown
attributes:
value: |
Before requesting: search [existing issues](../../../../labels/bug).
- type: textarea
attributes:
label: Current Behavior
description: "Description of the current behavior."
validations:
required: true

- type: textarea
attributes:
label: Expected Behavior
description: "Description of the expected behavior."
validations:
required: true

- type: textarea
attributes:
label: Steps To Reproduce
description: "Example steps to reproduce the behavior:"
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: true

- type: input
attributes:
label: Environment - OS
description: "Linux or Windows"
validations:
required: true

- type: input
attributes:
label: Polarion version
description: "2310, 2404, etc..."
validations:
required: true

- type: input
attributes:
label: Extension Version
description: "It can be found under https://<<host>>/polarion/#/project/dev/administration/<<Extension Name>>/About"
validations:
required: true

- type: textarea
attributes:
label: Anything else
description: "Further hints, links, or references? Any additional information probably helping in root cause analysis."
validations:
required: false
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Feature request
description: Request an enhancement for this Polarion extension
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
Before requesting: search [existing issues](../../../../labels/enhancement).
- type: textarea
attributes:
label: "Description"
description: "Describe the feature you're requesting."
placeholder: "This feature adds functionality to ..."
validations:
required: true

- type: textarea
attributes:
label: "Motivation"
description: "Describe additional context such as examples or use cases helping in understanding the feature request."
placeholder: "This feature would be helpful because ... so that the following use case is addressed: ..."
validations:
required: true

- type: textarea
attributes:
label: "Proposed Solution (optional)"
description: "Sketch an implementation idea, possibly considering multiple approaches."
validations:
required: false
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Proposed changes

Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the [supported keywords](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) here in this description (not in the title of the PR).

### Checklist

Before creating a PR, run through this checklist and mark each as complete:
- [ ] I have read the [`CONTRIBUTING`](CONTRIBUTING.md) document
- [ ] If applicable, I have added tests that prove my fix is effective or that my feature works
- [ ] If applicable, I have checked that any relevant tests pass after adding my changes
- [ ] I have updated any relevant documentation
82 changes: 82 additions & 0 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
name: maven-release
on:
push:
branches: [main, feature/**, renovate/**]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17 for deploy to S3 bucket
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17
cache: maven
- uses: whelk-io/maven-settings-xml-action@v22
with:
repositories: >
[
{
"id": "s3",
"name": "s3.sbb.polarion.maven.repo",
"url": "s3://sbb-polarion-maven-repo/polarion.mvn",
"releases": {
"enabled": "true",
"updatePolicy": "never"
}
},
{
"id": "repsy",
"name": "repsy.io",
"url": "https://repo.repsy.io/mvn/sbb/polarion",
"releases": {
"enabled": "true",
"updatePolicy": "never"
}
}
]
servers: >
[
{
"id": "s3",
"username": "${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY }}",
"password": "${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY }}"
},
{
"id": "github",
"username": "${env.GITHUB_ACTOR}",
"password": "${env.GITHUB_TOKEN}"
},
{
"id": "repsy",
"username": "${{ secrets.CH_SBB_POLARION_REPSY_USERNAME }}",
"password": "${{ secrets.CH_SBB_POLARION_REPSY_PASSWORD }}"
}
]
active_profiles: >
[
"github"
]
- name: Print settings.xml
run: cat /home/runner/.m2/settings.xml
- name: Build with Maven
run: mvn --batch-mode clean package
- name: Extract artefact version
id: artefact_version
run: echo ::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
- name: Publish to S3 bucket
if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') }}
run: mvn --batch-mode deploy -Ps3Deploy
- name: Publish to repsy.io
if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') }}
run: mvn --batch-mode deploy -PrepsyDeploy
- name: Publish to GitHub Packages
if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') }}
run: mvn --batch-mode deploy -PgithubDeploy
env:
GITHUB_TOKEN: ${{ github.token }}
31 changes: 31 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: PR checks

on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
- unlocked

permissions:
contents: read

jobs:
check-conventional-commit:
name: Check commit messages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.head.ref }}"
repository: "${{ github.event.pull_request.head.repo.full_name }}"
fetch-depth: 0
- uses: actions/setup-python@v5
with:
cache: "pip" # caching pip dependencies
- run: pip install commitizen
- name: Check commit messages
run: cz check --rev-range origin/${GITHUB_BASE_REF}..
18 changes: 18 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: release-please
on:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: release-please
id: release
uses: google-github-actions/release-please-action@v4
with:
release-type: maven
default-branch: main
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
.idea/*

# code style config
!.idea/codeStyles
.idea/codeStyles/*
!.idea/codeStyles/Project.xml
!.idea/codeStyles/codeStyleConfig.xml

target/
*.iml
dependency-reduced-pom.xml
11 changes: 11 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<extensions>
<extension>
<groupId>com.github.seahen</groupId>
<artifactId>maven-s3-wagon</artifactId>
<version>1.3.3</version>
</extension>
</extensions>
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
default_install_hook_types: [pre-commit, commit-msg]
repos:
- repo: https://github.com/lyz-code/yamlfix
rev: 1.13.0
hooks:
- id: yamlfix
args: [-c .yamlfix]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: check-xml
- id: check-json
- id: check-yaml
- id: detect-private-key
- id: no-commit-to-branch
- id: mixed-line-ending
- repo: https://github.com/zricethezav/gitleaks
rev: v8.18.0
hooks:
- id: gitleaks
- repo: https://github.com/grigoriev/pre-commit-check-git-user
rev: v0.9.0
hooks:
- id: check-git-config-user-email
args: [--templates, ^\S+\.\S+@sbb\.ch$]
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
hooks:
- id: commitizen
3 changes: 3 additions & 0 deletions .yamlfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
allow_duplicate_keys = false
line_length = 120
sequence_style = "flow_style"
Loading

0 comments on commit 6fcb60e

Please sign in to comment.