Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
feat(release): automated github release and changelog creation
Browse files Browse the repository at this point in the history
  • Loading branch information
eshepelyuk committed Sep 3, 2019
1 parent a3dbcf4 commit 809d274
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 24 deletions.
22 changes: 22 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"git": {
"requireCommits": true,
"commit": false,
"push": true,
"tag": true
},

"npm": {
"publish": false
},

"github": {
"release": true
},

"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular"
}
}
}
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ cache:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

script: ./travis_build.sh

deploy:
- provider: script
skip_cleanup: true
Expand Down
37 changes: 28 additions & 9 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Follow the steps described at https://plugins.gradle.org/plugin/com.github.lkish
Plugin versioning::
Since `Gatling` v3.0.0 this plugin's major version follows `Gatling` 's
major version for making things easier.

Source code layout::
Since `Gatling` v3.0.0 and corresponding plugin version `v3.x.x`
there were breaking changes introduced for source code layout.
Expand Down Expand Up @@ -55,15 +55,15 @@ The plugin defines the following extension properties in the `gatling` closure
|[source,groovy]
----
['-server', '-Xmx1G',
'-XX:+UseG1GC', '-XX:MaxGCPauseMillis=30',
'-XX:+UseG1GC', '-XX:MaxGCPauseMillis=30',
'-XX:G1HeapRegionSize=16m',
'-XX:InitiatingHeapOccupancyPercent=75',
'-XX:+ParallelRefProcEnabled',
'-XX:+PerfDisableSharedMem',
'-XX:+AggressiveOpts',
'-XX:InitiatingHeapOccupancyPercent=75',
'-XX:+ParallelRefProcEnabled',
'-XX:+PerfDisableSharedMem',
'-XX:+AggressiveOpts',
'-XX:+OptimizeStringConcat',
'-XX:+HeapDumpOnOutOfMemoryError',
'-Djava.net.preferIPv4Stack=true',
'-XX:+HeapDumpOnOutOfMemoryError',
'-Djava.net.preferIPv4Stack=true',
'-Djava.net.preferIPv6Addresses=false']
----
| Additional arguments passed to JVM when executing `Gatling` simulations
Expand Down Expand Up @@ -225,6 +225,25 @@ Run single simulation implemented in `com.project.simu.MySimulation` class::
+
$ gradle gatlingRun-com.project.simu.MySimulation

== Release a new version

. NodeJS and Npm must be installed.
. Create `GitHub` https://github.com/settings/tokens/new[access token]. Only `repo` scope is required.
. Install https://github.com/release-it/release-it[release-it]
+
$ npm install -g release-it @release-it/conventional-changelog

. Run
+
[source, bash]
----
$ env GITHUB_TOKEN=${....} release-it --ci patch <1> <2>
----
<1> paste token value from step *2*
<2> can be `patch`, `minor`, `major`

. Release script will create and push tag to `GitHub`, create a release with a changelog in `GitHub` and publish plugin to `Gradle` plugin portal.

== Troubleshooting and known issues

=== Spring Boot and Netty version
Expand All @@ -233,7 +252,7 @@ https://github.com/lkishalmi/gradle-gatling-plugin/issues/53[Original issue]

Caused by `io.spring.dependency-management` plugin and Spring platform BOM files.
The dependency management plugin ensures that all declared dependencies have exactly the same versions as declared in BOM.
Since `Spring Boot` declares own `Netty` version (e.g. `4.1.22.Final`) - this version is applied globally
Since `Spring Boot` declares own `Netty` version (e.g. `4.1.22.Final`) - this version is applied globally
for all the configurations of the `Gradle` project, even if configuration doesn't use `Spring`.

There's 2 ways of solving the problem, depending on the actual usage of `Netty` in the project
Expand Down
15 changes: 0 additions & 15 deletions release.sh

This file was deleted.

6 changes: 6 additions & 0 deletions travis_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -ev

if [ -z "${TRAVIS_TAG}" ]; then
./gradlew check
fi

0 comments on commit 809d274

Please sign in to comment.