Skip to content

Commit 3d0f259

Browse files
ci: sonarqube Gradle 7.4 (#655)
1 parent e578606 commit 3d0f259

File tree

9 files changed

+101
-25
lines changed

9 files changed

+101
-25
lines changed

.github/workflows/graalvm.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
sudo rm -rf "/usr/local/share/boost"
2828
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
2929
sudo apt-get clean
30-
df -h
30+
df -h
3131
- uses: actions/checkout@v2
3232
- uses: actions/[email protected]
3333
with:
@@ -38,7 +38,7 @@ jobs:
3838
- name: Setup GraalVM CE
3939
uses: graalvm/setup-graalvm@v1
4040
with:
41-
version: '21.3.0'
41+
version: '22.0.0.2'
4242
java-version: ${{ matrix.java }}
4343
components: 'native-image'
4444
- name: Build with Gradle
@@ -56,7 +56,7 @@ jobs:
5656
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
5757
- name: Publish Test Report
5858
if: always()
59-
uses: mikepenz/action-junit-report@v2
59+
uses: mikepenz/action-junit-report@v2.9.1
6060
with:
6161
check_name: GraalVM CE CI / Test Report (Java ${{ matrix.java }})
6262
report_paths: '**/build/test-results/test/TEST-*.xml'

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
6060
- name: Publish Test Report
6161
if: always()
62-
uses: mikepenz/action-junit-report@v2
62+
uses: mikepenz/action-junit-report@v2.9.1
6363
with:
6464
check_name: Java CI / Test Report (${{ matrix.java }})
6565
report_paths: '**/build/test-results/test/TEST-*.xml'

.github/workflows/release-notes.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
- '[1-9]+.[0-9]+.x'
1414
jobs:
1515
release_notes:
16+
if: github.repository != 'micronaut-projects/micronaut-project-template'
1617
runs-on: ubuntu-latest
1718
steps:
1819
- uses: actions/checkout@v2

.github/workflows/sonarqube.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# WARNING: Do not edit this file directly. Instead, go to:
2+
#
3+
# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows
4+
#
5+
# and edit them there. Note that it will be sync'ed to all the Micronaut repos
6+
name: Static Analysis
7+
on:
8+
push:
9+
branches:
10+
- master
11+
- '[1-9]+.[0-9]+.x'
12+
pull_request:
13+
branches:
14+
- master
15+
- '[1-9]+.[0-9]+.x'
16+
jobs:
17+
build:
18+
if: github.repository != 'micronaut-projects/micronaut-project-template'
19+
runs-on: ubuntu-latest
20+
steps:
21+
# https://github.com/actions/virtual-environments/issues/709
22+
- name: Free disk space
23+
run: |
24+
sudo rm -rf "/usr/local/share/boost"
25+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
26+
sudo apt-get clean
27+
df -h
28+
- uses: actions/checkout@v3
29+
with:
30+
fetch-depth: 0
31+
- uses: actions/[email protected]
32+
with:
33+
path: ~/.gradle/caches
34+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
35+
restore-keys: |
36+
${{ runner.os }}-gradle-
37+
- name: Set up JDK
38+
uses: actions/setup-java@v2
39+
with:
40+
distribution: 'adopt'
41+
java-version: 11
42+
- name: Optional setup step
43+
env:
44+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
45+
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
46+
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
47+
run: |
48+
[ -f ./setup.sh ] && ./setup.sh || true
49+
- name: Analyse with Gradle
50+
run: |
51+
./gradlew check sonarqube --no-daemon --parallel --continue
52+
env:
53+
TESTCONTAINERS_RYUK_DISABLED: true
54+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
55+
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
56+
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
57+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

MAINTAINING.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,35 +41,35 @@ There are sometimes where we are not sure whether we want or can solve an issue.
4141
There are also a bunch of `relates-to` labels that can be used to further categorise issues. This is helpful in projects
4242
with a lot of issues, or projects where different people work on different parts or modules.
4343

44-
The majority of the issues are defined in the
44+
The majority of the issues are defined in the
4545
[management](https://github.com/micronaut-projects/management/blob/master/labels.tf) repo, and propagated via Terraform.
4646
If you want new labels:
4747

4848
* If they can be beneficial to several repos, send a pull request to the management repo.
4949
* If they are repo-specific, just go ahead and create them with the GitHub UI.
5050

51-
Finally, issues (especially bugs) should be prioritised with either `priority: high`, `priority: medium` or
51+
Finally, issues (especially bugs) should be prioritised with either `priority: high`, `priority: medium` or
5252
`priority: low`. Checkout the
5353
[Issue Priority Labels](https://github.com/micronaut-projects/micronaut-core/wiki/Issue-Priority-Labels) document for
5454
guidelines about when to use each of them.
5555

5656
## Review pull requests
5757

58-
Pull requests, regardless of whether they are created by internal or external contributors, should meet the following
58+
Pull requests, regardless of whether they are created by internal or external contributors, should meet the following
5959
criteria:
6060

6161
* All the GitHub checks are passing (CLA signed and builds passing).
6262
* Code has a minimum quality, it uses the Micronaut APIs correctly, doesn't contain bad smells, etc. Essentially, the
6363
type of things you would review in every other software project.
6464
* Contains tests.
6565
* Includes documentation.
66-
* If it closes any issues,
66+
* If it closes any issues,
6767
[they should be linked](https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue)
6868
either using closing keywords, or manually.
6969

70-
Regarding the target branch, backwards-compatible bug fixes and improvements typically target the default branch,
70+
Regarding the target branch, backwards-compatible bug fixes and improvements typically target the default branch,
7171
backwards-compatible enhancements target the next minor version branch, and breaking changes target the next major version
72-
branch. Check the
72+
branch. Check the
7373
[Micronaut Module Versioning](https://github.com/micronaut-projects/micronaut-core/wiki/Micronaut-Module-Versioning)
7474
document for more information.
7575

@@ -78,7 +78,7 @@ patch/minor release we don't leak breaking changes. Check the
7878
[Micronaut Module Branch Naming](https://github.com/micronaut-projects/micronaut-core/wiki/Micronaut-Module-Branch-Naming)
7979
document for more information.
8080

81-
Note that
81+
Note that
8282
[Micronaut Core and Starter](https://github.com/micronaut-projects/micronaut-core/wiki/Micronaut-Core-and-Starter-Branching-Strategy)
8383
follow a slightly different strategy.
8484

@@ -93,17 +93,17 @@ All Micronaut repos have 2 dependency upgrade checking mechanism:
9393
those defined in `gradle.properties`. It will also send different PRs for the same version upgrade if the artifact ID
9494
is different. For example, if you have `com.example:client:1.0` and `com.example:server:1.0`, and a new 1.1 version
9595
arrives for both, it will send 2 PRs, where they should both be upgraded at the same time.
96-
96+
9797
2. To overcome those disadvantages, we have our own dependency upgrade solution based on the
9898
[Gradle Use Latest Versions Plugin](https://github.com/patrikerdes/gradle-use-latest-versions-plugin). It runs daily
9999
during weekdays.
100-
100+
101101
The consequence of having both approaches in place is that we get multiple dependency upgrade PRs: one created by
102102
`micronaut-build` via our automation, and one or many (one per dependency) created by Dependabot. When merging those, it
103-
is better to prefer the `micronaut-build` ones, if possible, for 2 reasons: a) they attempt to upgrade multiple dependencies
103+
is better to prefer the `micronaut-build` ones, if possible, for 2 reasons: a) they attempt to upgrade multiple dependencies
104104
in a single PR, which creates less noise in the Git history; b) Once you merge that, Dependabot will react and automatically
105105
close its own PRs if the dependecy is up-to-date.
106-
106+
107107
When an upgrade to a new version arrives, we need to be careful when merging, so that we don't introduce an
108108
unnecessary upgrade burden on our users. Read the
109109
[Module Upgrade Strategy](https://github.com/micronaut-projects/micronaut-core/wiki/Module-Upgrade-Strategy) for more
@@ -157,7 +157,7 @@ Note that it is perfectly possible to have new workflows that aren't part of the
157157
The release process is highly automated and normally involves just publishing a GitHub release. But before you get there,
158158
there are some parts you need to understand first.
159159

160-
First of all, all the repos have an automatic changelog generation mechanism: when a change is made to the repo
160+
First of all, all the repos have an automatic changelog generation mechanism: when a change is made to the repo
161161
(a push event), it creates (or updates if there is already one) a draft release, calculating the next patch version. The
162162
release notes will contain pull requests merged and issues closed since the last release.
163163

@@ -168,21 +168,21 @@ If you are publishing a milestone or release candidate, check the pre-release ch
168168

169169
Note that the release tags must be preceded with `v`, e.g.: `v1.2.3`.
170170

171-
Once you publish the GitHub release, the
171+
Once you publish the GitHub release, the
172172
[Release GitHub Action workflow](https://github.com/micronaut-projects/micronaut-project-template/blob/master/.github/workflows/release.yml)
173173
will kick off, performing the following steps:
174174

175-
* Pre-release: sets the `projectVersion` property in `gradle.properties` to the release version, and commit and pushes
175+
* Pre-release: sets the `projectVersion` property in `gradle.properties` to the release version, and commit and pushes
176176
the result.
177177
* Generates documentation guide and publishes it to the `gh-pages` branch.
178178
* Sends a pull request to Core to update the BOM.
179-
* Post-release:
179+
* Post-release:
180180
* Determines the next patch version, and sets it as a `SNAPSHOT` version.
181181
* Closes the milestone that matches the release version, and creates a new one for the next patch.
182182

183183
If everything goes well, you now need to manually trigger the Maven Central publishing workflow via the GitHub UI.
184184

185-
If there is an issue with the release, it's important not to trigger the Maven Central publishing workflow because once
185+
If there is an issue with the release, it's important not to trigger the Maven Central publishing workflow because once
186186
we publish a version to Maven Central we cannot change or remove it anymore.
187187

188188
There are some properties in `gradle.properties` that affect the release process:
@@ -192,19 +192,19 @@ There are some properties in `gradle.properties` that affect the release process
192192
* `bomProperty`: in Micronaut Core's `gradle.properties`, the property that represents this module's version.
193193
* `bomProperties`: if needed, additional properties for the BOM pull request.
194194

195-
For example, assuming a module has the release `1.0.0` as the latest version published, which was included in the
195+
For example, assuming a module has the release `1.0.0` as the latest version published, which was included in the
196196
Micronaut `2.2.0` BOM. If the next version you want to publish is:
197197

198198
* A new patch release (`1.0.1`): simply publish the existing draft release.
199-
* A new minor release (`1.1.0`):
199+
* A new minor release (`1.1.0`):
200200
* Before the release, push a `1.0.x` branch off `master`.
201201
* Bump the version in master to `1.1.0-SNAPSHOT`.
202202
* Set the `githubCoreBranch` property to `2.3.x` (or `3.0.x` if it will be the next one).
203203
* Edit the draft release setting the version to `1.1.0` in the release title, body, tag, etc.
204204
* Publish the release.
205-
* A new major release (`2.0.0`):
205+
* A new major release (`2.0.0`):
206206
* Before the release, push a `1.0.x` branch off `master`.
207207
* Bump the version in master to `2.0.0-SNAPSHOT`.
208208
* Set the `githubCoreBranch` property to `3.0.x` (or `2.3.x` if this new major version doesn't introduce breaking changes).
209209
* Edit the draft release setting the version to `2.0.0` in the release title, body, tag, etc.
210-
* Publish the release.
210+
* Publish the release.

SECURITY.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Security Policy
2+
3+
We release patches for security vulnerabilities. Which versions are eligible
4+
receiving such patches depend on the CVSS v3.0 Rating:
5+
6+
| CVSS v3.0 | Supported Versions |
7+
| --------- | ----------------------------------------- |
8+
| 9.0-10.0 | Releases within the previous three months |
9+
| 4.0-8.9 | Most recent release |
10+
11+
## Reporting a Vulnerability
12+
13+
Please responsibly disclose (suspected) security vulnerabilities to
14+
**[The Micronaut Foundation]([email protected])**. You will receive a response from
15+
us within 48 hours. If the issue is confirmed, we will release a patch as soon
16+
as possible depending on complexity but historically within a few days.

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
plugins {
22
id "io.micronaut.build.internal.docs"
33
id "io.micronaut.build.internal.dependency-updates"
4+
id "io.micronaut.build.internal.quality-reporting"
45
}

gradle/wrapper/gradle-wrapper.jar

285 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)