Skip to content
Open
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
63 changes: 34 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
- run:
name: Audit Dependencies
command: ./gradlew dependencyCheckAnalyze

test:
parameters:
jdk-version:
Expand All @@ -26,22 +25,33 @@ jobs:
- image: rabbitmq:3.8.3
steps:
- checkout
- run: TERM=${TERM:-dumb} ./gradlew clean test
- run:
name: Run Tests
command: TERM=${TERM:-dumb} ./gradlew clean test
- store_test_results:
path: build/reports
publish:
test_and_build_snapshot:
executor: docker
docker:
- image: amazoncorretto:17-alpine-jdk
working_directory: ~/sailor-jvm
steps:
- checkout
- run: |
TERM=${TERM:-dumb} ./gradlew shadowJar
- store_artifacts:
path: ~/sailor-jvm/build/libs
test_and_build_release:
executor: docker
docker:
- image: amazoncorretto:17-alpine-jdk
working_directory: ~/sailor-jvm
steps:
- checkout
- run: |
TERM=${TERM:-dumb} ./gradlew publish -PsonatypeUsername=$SONATYPE_USERNAME \
-PsonatypePassword=$SONATYPE_PASSWORD \
-PsigningPassword=${SIGNING_PSW} \
-PsigningKeyBase64=${SIGNING_KEY} \
-PkeyId=${SIGNING_KEY_ID}
TERM=${TERM:-dumb} ./gradlew publishToMavenLocal
- store_artifacts:
path: ~/sailor-jvm/build/libs/
workflows:
nightly:
triggers:
Expand All @@ -54,48 +64,43 @@ workflows:
jobs:
- audit:
name: "Audit dependencies"
test_and_publish_snapshot:
build_snapshot:
jobs:
- audit:
name: "Audit dependencies"
- audit
- test:
matrix:
parameters:
jdk-version: [ "amazoncorretto:8-alpine-jdk", "amazoncorretto:11-alpine-jdk", "amazoncorretto:17-alpine-jdk" ]
- publish:
name: "Publish SNAPSHOT version to Maven"
jdk-version: [ "amazoncorretto:11-alpine-jdk", "amazoncorretto:17-alpine-jdk" ]
- test_and_build_snapshot:
requires:
- audit
- test
- "Audit dependencies"
filters:
tags:
ignore: /.*/
test_and_publish_release:
branches:
ignore: master
build_release:
jobs:
- audit:
name: "Audit dependencies"
filters:
branches:
ignore: /.*/
tags:
only: /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/
- test:
filters:
branches:
ignore: /.*/
tags:
only: /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/
matrix:
parameters:
jdk-version: [ "amazoncorretto:8-alpine-jdk", "amazoncorretto:11-alpine-jdk", "amazoncorretto:17-alpine-jdk" ]

- publish:
name: "Publish release version to Maven"
jdk-version: [ "amazoncorretto:11-alpine-jdk", "amazoncorretto:17-alpine-jdk" ]
filters:
branches:
ignore: /.*/
tags:
only: /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/
- test_and_build_release:
requires:
- audit
- test
- "Audit dependencies"
filters:
branches:
only: master
tags:
only: /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ ELASTICIO_SNAPSHOT_ROUTING_KEY=javasailor.test_exec.step_1.snapshot
ELASTICIO_REBOUND_ROUTING_KEY=javasailor.test_exec.step_1.rebound
ELASTICIO_SHAPSHOT_ROUTING_KEY=javasailor.test_exec.step_1.rebound
ELASTICIO_MESSAGE_CRYPTO_PASSWORD=k8HO8UurPfKUNjECNAbvLRjBHWkIWz
ELASTICIO_MESSAGE_CRYPTO_IV=1gmpybK4iLRRyyu0
ELASTICIO_MESSAGE_CRYPTO_IV=1gmpybK4iLRRyyu0
ELASTICIO_API_REQUEST_RETRY_ATTEMPTS=10
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ To build the project run in terminal
- `ELASTICIO_CONSUMER_THREAD_POOL_SIZE` - if not specified (by default) it equals Prefetch Count value. Indicates the size of the thread pool for AMQP consumers.

## Development lifecycle
Prerequisites:
Prerequisites:
Imagine that current sailor version is `3.5.1` and you gonna release new major version `4.0.0`
1. Create branch to implement feature.
2. During implementation specify `-SNAPHOT` suffix for the version in the `build.gradle`. The version should have next value - `4.0.0-SHAPSHOT`.
3. If you want to test new sailor version, just push changes to your feature branch. If you push any changes to the Sailor GitHub repository with X.X.X-SNAPSHOT, circle.ci will automatically upload the SNAPSHOT version to Sonatype repository.
After CI job will be done you can use `4.0.0-SHAPSHOT` version in the components.
1. Create branch to implement feature.
2. During implementation specify `-SNAPSHOT` suffix for the version in the `build.gradle`. The version should have next value - `4.0.0-SHAPSHOT`.
3. If you want to test new sailor version, just push changes to your feature branch. If you push any changes to the Sailor GitHub repository with X.X.X-SNAPSHOT, circle.ci will automatically upload the SNAPSHOT version to Sonatype repository.
After CI job will be done you can use `4.0.0-SHAPSHOT` version in the components.
4. After code changes will be reviewed and tested by qa, remove `-SNAPHOT` suffix, and merge Pull Request to **master** branch. The version should have next value - `4.0.0`.
5. To publish stable release version create GitHub release with tag **4.0.0**. This will trigger CI pipeline to publish release version to the Production maven repository.

Expand Down Expand Up @@ -48,4 +48,4 @@ Once you finally decided that you want to publish the Sailor artefacts to Maven

11. Use the artefacts from Maven Central

Usually it takes 8 to 24 hour for the published artefacts to appear on Maven Central. Just check [here](https://search.maven.org/search?q=a:sailor-jvm) to find out if the Sailor version is finally publicly available.
Usually it takes 8 to 24 hour for the published artefacts to appear on Maven Central. Just check [here](https://search.maven.org/search?q=a:sailor-jvm) to find out if the Sailor version is finally publicly available.
20 changes: 13 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
group = 'io.elastic'
version = '4.0.3'
sourceCompatibility = '1.8'
version = '5.0.0-SNAPSHOT'
sourceCompatibility = '11'

dependencyCheck {
format = 'ALL'
Expand Down Expand Up @@ -60,10 +60,10 @@ dependencies {
api 'com.rabbitmq:amqp-client:5.21.0'
api 'commons-codec:commons-codec:1.17.1'
api 'commons-io:commons-io:2.16.1'
api 'org.apache.httpcomponents:httpclient:4.5.14'
api 'com.google.inject:guice:5.1.0'
api 'com.google.inject.extensions:guice-assistedinject:5.1.0'
api 'ch.qos.logback:logback-classic:1.2.13'
api 'org.apache.httpcomponents.client5:httpclient5:5.5'
api 'com.google.inject:guice:7.0.0'
api 'com.google.inject.extensions:guice-assistedinject:7.0.0'
api 'ch.qos.logback:logback-classic:1.5.18'
api 'ch.qos.logback.contrib:logback-json-classic:0.1.5'
api 'ch.qos.logback.contrib:logback-jackson:0.1.5'
api 'com.fasterxml.jackson.core:jackson-databind:2.17.2'
Expand All @@ -89,7 +89,7 @@ java {
}

wrapper {
gradleVersion = '7.5.1'
gradleVersion = '8.5'
}

publishing {
Expand Down Expand Up @@ -213,3 +213,9 @@ shadowJar {
archiveVersion.set(project.version.toString())
archiveClassifier.set('')
}

task printVersion {
doLast {
println "Sailor JVM version: ${project.version}"
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading