Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update workflows and configurations with repo template #38 #43

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@ body:
- type: input
attributes:
label: Extension Version
description: It can be found under https://<<host>>/polarion/#/project/dev/administration/<<Extension
Name>>/About
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.
description: Further hints, links, or references? Any additional information probably helping in root cause analysis.
validations:
required: false
6 changes: 2 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ body:
- 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: ...'
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
Expand Down
32 changes: 3 additions & 29 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: maven-release
on:
push:
branches: [main, feature/**, renovate/**]
branches: ['**/**']
jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -51,35 +51,16 @@ jobs:
"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 }}"
}
]
profiles: >
[
{
"id": "s3Deploy",
"properties":
{
"altDeploymentRepository": "s3::default::s3://sbb-polarion-maven-repo/polarion.mvn"
}
},
{
"id": "githubDeploy",
"properties":
{
"altDeploymentRepository": "github::default::https://maven.pkg.github.com/SchweizerischeBundesbahnen/ch.sbb.polarion.extension.interceptor"
}
},
{
"id": "repsyDeploy",
"properties":
{
"altDeploymentRepository": "repsy::default::https://repo.repsy.io/mvn/sbb/polarion"
}
}
]
- name: Print settings.xml
Expand All @@ -88,16 +69,9 @@ jobs:
run: mvn --batch-mode clean package
- name: Extract artefact version
id: artefact_version
run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
>> $GITHUB_OUTPUT
- 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
run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
- name: Publish to GitHub Packages
if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') }}
if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') && github.ref == 'refs/heads/main' }}
run: mvn --batch-mode deploy -PgithubDeploy
env:
GITHUB_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
uses: googleapis/release-please-action@v4
with:
release-type: maven
default-branch: main
target-branch: main
11 changes: 5 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@
default_install_hook_types: [pre-commit, commit-msg]
repos:
- repo: https://github.com/lyz-code/yamlfix
rev: 1.13.0
rev: 1.16.0
hooks:
- id: yamlfix
args: [-c .yamlfix]
args: [-c, .yamlfix.toml]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.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
rev: v8.18.3
hooks:
- id: gitleaks
- repo: https://github.com/grigoriev/pre-commit-check-git-user
Expand All @@ -27,6 +26,6 @@ repos:
- id: check-git-config-user-email
args: [--templates, ^\S+\.\S+@sbb\.ch$]
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
rev: v3.27.0
hooks:
- id: commitizen
2 changes: 1 addition & 1 deletion .yamlfix → .yamlfix.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
allow_duplicate_keys = false
line_length = 120
line_length = 180
sequence_style = "flow_style"
133 changes: 0 additions & 133 deletions CODE_OF_CONDUCT.md

This file was deleted.

17 changes: 1 addition & 16 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":prNotPending",
":rebaseStalePrs",
":semanticCommits"
],
"branchConcurrentLimit": 1,
"packageRules": [
{
"matchManagers": ["maven"],
"allowedVersions": "!/-jboss-|-redhat-|redhat-|-jenkins-|-patch-|-atlassian-|-NODEP$|-atlassian$|-jbossorg-|-SNAPSHOT$|-PFD-|-jbossas-|-does-not-exist|-tc$|-jahia1$/"
},
{
"matchManagers": ["maven"],
"matchDepTypes": ["provided", "runtime"],
"enabled": false
}
"github>SchweizerischeBundesbahnen/casc-renovate-preset-polarion-java"
]
}
Loading