-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUILD-5090 parent oss setup pre commit validation at pr level (#166)
* BUILD-5090 Setup pre-commit.yml workflow That way pre-commit checks are enforced at PR level * Resolve all pre-commit issues in the project That way we start on a clean stage
- Loading branch information
1 parent
818735d
commit b846776
Showing
6 changed files
with
57 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Pre-commit checks | ||
on: | ||
pull_request: | ||
merge_group: | ||
|
||
jobs: | ||
pre-commit: | ||
name: "pre-commit" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: SonarSource/gh-action_pre-commit@2f1b605a435e0896282366dce6ca4ce9b98705b5 # 0.0.6 | ||
with: | ||
extra-args: > | ||
--from-ref=origin/${{ github.event.pull_request.base.ref }} | ||
--to-ref=${{ github.event.pull_request.head.sha }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Default state for all rules | ||
default: true | ||
|
||
MD029: | ||
style: ordered |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
### License | ||
# parent-oss | ||
|
||
## License | ||
|
||
Copyright 2009-2024 SonarSource. | ||
|
||
Licensed under the [GNU Lesser General Public License, Version 3.0](http://www.gnu.org/licenses/lgpl.txt) | ||
|
||
### Releasing | ||
## Releasing | ||
|
||
After the build artifacts get promoted to the releases repository on repox, | ||
After the build artifacts get promoted to the releases repository on repox, | ||
they get automatically uploaded to Maven Central. | ||
|
||
The release process is described in [RELEASE.md](./RELEASE.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
# Releasing the parent-oss project | ||
|
||
> WARN: Due to some internal tooling (releasability checks) semantic versioning is barely supported. | ||
> | ||
> WARN: Due to some internal tooling (releasability checks) | ||
> semantic versioning is barely supported. | ||
> | ||
> Therefore, a new release number has to be a new **major**. | ||
Assume you want to release from version `70.0.0.x`, | ||
Assume you want to release from version `70.0.0.x`, | ||
**the next version must be** `71.0.0.x` | ||
1. Prepare a new project release in [Jira](https://sonarsource.atlassian.net/projects/PARENTOSS?selectedItem=com.atlassian.jira.jira-projects-plugin%3Arelease-page) with as version `71.0` (no patch or build number) | ||
|
||
1. Prepare a new project release in [Jira](https://sonarsource.atlassian.net/projects/PARENTOSS?selectedItem=com.atlassian.jira.jira-projects-plugin%3Arelease-page) | ||
with as version `71.0` (no patch or build number) | ||
|
||
2. Leave the Jira version status as `UNRELEASED` | ||
3. Update pom.xml version of parent-oss project. (example [PR](https://github.com/SonarSource/parent-oss/pull/158/files)) | ||
4. Check that releasability checks pass on [Burgr](https://burgr.sonarsource.com/projects/SonarSource/parent-oss/main) | ||
5. Retrieve the last build number on [Burgr](https://burgr.sonarsource.com/projects/SonarSource/parent-oss/main) (`major.minor.patch.build-number`) | ||
6. On GitHub create a new release and set this number retrieved from Burgr as tag and release version | ||
5. Retrieve the last build number on [Burgr](https://burgr.sonarsource.com/projects/SonarSource/parent-oss/main) | ||
(`major.minor.patch.build-number`) | ||
6. On GitHub create a new release and set this number retrieved from Burgr | ||
as tag and release version | ||
7. Publish the release | ||
8. Check that the [GitHub release workflow](https://github.com/SonarSource/parent-oss/actions/workflows/release.yml) run well | ||
9. Check it is gracefully deployed on [Sonatype](https://central.sonatype.com/artifact/org.sonarsource.parent/parent). | ||
8. Check that the [GitHub release workflow](https://github.com/SonarSource/parent-oss/actions/workflows/release.yml) | ||
run well | ||
9. Check it is gracefully deployed on [Sonatype](https://central.sonatype.com/artifact/org.sonarsource.parent/parent). | ||
|
||
> WARN: It can take up to 24h to have the release synchronized with Sonatype. Sometimes it is very fast sometimes not) | ||
> WARN: It can take up to 24h to have the release synchronized with Sonatype. | ||
> Sometimes it is very fast sometimes not) |