File tree Expand file tree Collapse file tree 6 files changed +89
-15
lines changed
Expand file tree Collapse file tree 6 files changed +89
-15
lines changed Original file line number Diff line number Diff line change 3030
3131 muzzle :
3232 docker :
33- # specify the version you desire here
3433 - image : circleci/openjdk:11.0.6-jdk-buster
3534 working_directory : ~/repo
3635 environment :
@@ -40,12 +39,31 @@ jobs:
4039 steps :
4140 - checkout
4241 - run : make muzzle
42+ publish :
43+ docker :
44+ - image : circleci/openjdk:11.0.6-jdk-buster
45+ steps :
46+ - checkout
47+ - run : ./gradlew :tag -Prelease
48+ - run : ./gradlew publish
49+ - add_ssh_keys :
50+ fingerprints :
51+ - ' f1:dd:0f:dc:42:b3:bf:9f:b8:e3:e8:3f:9b:92:04:fb'
52+ - run : git push origin $(./gradlew -q :printVersion)
4353
4454workflows :
4555 version : 2
4656 build :
4757 jobs :
48- - build :
49- context : artifactory-gradle
50- - muzzle :
51- context : artifactory-gradle
58+ - build
59+ - muzzle
60+ - publish :
61+ context : hypertrace-publishing
62+ requires :
63+ - build
64+ - muzzle
65+ filters :
66+ branches :
67+ ignore : /.*/
68+ tags :
69+ only : /^release-.*/
Original file line number Diff line number Diff line change 1+ # Release
2+
3+ This repository uses automated build process. The release build is triggered by pushing a release tag e.g.
4+ ` git tag release-1 ` (` 1 ` is a sequence number to trigger the release).
5+ The release version is supplied from the
6+ [ Hypertrace version plugin] ( https://github.com/hypertrace/hypertrace-gradle-version-settings-plugin )
7+ that uses git history and [ semantic versioning settings] ( ./semantic-build-versioning.gradle ) to
8+ decide what the next release version should be.
9+
10+ The major version is incremented if commit history contains:
11+ * Prefix ` BREAKING CHANGE `
12+ * Feature suffix ` ! ` e.g. ` feat! ` or ` feat(scope)! `
13+
14+ The minor version is incremented if commit history contains:
15+ * ` feat ` or ` feat(scope) `
16+
17+ The patch version is incremented in other cases.
18+
19+ ## Print the next release version run:
20+
21+ ``` bash
22+ ./gradlew printVersion -Prelease
23+ ```
24+
25+ ## Configuration
26+
27+ * Add SSH key
28+ * Generate SSH key ` ssh-keygen -t rsa -b 4096 -m PEM -C <email> ` without passphrase
29+ * Add private key to CircleCI project settings with ` github.com ` domain: https://app.circleci.com/settings/project/github/Traceableai/opentelemetry-javaagent/ssh
30+ * Add public key to Github project deploy keys and check "allow write access" https://github.com/Traceableai/opentelemetry-javaagent/settings/keys
31+ * Add fingerprint from CircleCI project settings to ` ./circleci/config.yml `
32+ * Configure CI to release on ` release- ` tag or merge to the main branch.
33+ * Configure CI to have access to bintray. E.g. add ` hypertrace-publishing ` context to the publish job.
34+ * Configure gradle
35+ * Add ` org.hypertrace.version-settings ` [ Hypertrace version plugin] ( https://github.com/hypertrace/hypertrace-gradle-version-settings-plugin )
36+ * Add ` org.hypertrace.publish-plugin ` [ Hypertrace publish plugin] ( https://github.com/hypertrace/hypertrace-gradle-publish-plugin )
Original file line number Diff line number Diff line change 11plugins {
22 `java- library`
33 id(" com.diffplug.spotless" ) version " 5.2.0" apply false
4+ id(" org.hypertrace.publish-plugin" ) version " 0.3.3" apply false
45}
56
67description = " Hypertrace OpenTelemetry Java agent"
78group = " org.hypertrace.agent"
8- version = " 0.0.1"
99
1010allprojects {
1111 apply (plugin= " java-library" )
12- group = rootProject.group
1312 java {
1413 sourceCompatibility = JavaVersion .VERSION_1_8
1514 targetCompatibility = JavaVersion .VERSION_1_8
1615 }
1716}
1817
1918subprojects {
20- version = rootProject.version
21-
2219 apply<JavaPlugin >()
2320 apply (plugin = " com.diffplug.spotless" )
2421 apply (from = " $rootDir /gradle/spotless.gradle" )
@@ -32,12 +29,11 @@ subprojects {
3229 maven {
3330 url = uri(" https://oss.jfrog.org/artifactory/oss-snapshot-local" )
3431 }
35- maven {
36- url = uri(extra.properties[" artifactory_contextUrl" ] as String + " /gradle" )
37- credentials {
38- username = extra.properties[" artifactory_user" ] as String
39- password = extra.properties[" artifactory_password" ] as String
40- }
32+ }
33+
34+ pluginManager.withPlugin(" org.hypertrace.publish-plugin" ) {
35+ configure< org.hypertrace.gradle.publishing.HypertracePublishExtension > {
36+ license.set(org.hypertrace.gradle.publishing.License .APACHE_2_0 )
4137 }
4238 }
4339
Original file line number Diff line number Diff line change 11plugins {
22 `java- library`
33 id(" com.github.johnrengelman.shadow" ) version " 6.0.0"
4+ id(" org.hypertrace.publish-plugin" )
45}
56
67dependencies {
Original file line number Diff line number Diff line change 1+ // Follows https://www.conventionalcommits.org/en/v1.0.0/#summary with one change: any commit is treated as a release,
2+ // patch being the default if major or minor is not detected.
3+
4+ autobump {
5+ // match any message starting with a type/scope suffixed with !, or with a line starting with "BREAKING CHANGE:"
6+ majorPattern = ~/ (?m)(\A [^:]+(?<=!): |^BREAKING CHANGE:)/
7+ // match any commit message starting with "feat: " or "feat(any scope): "
8+ minorPattern = ~/ ^feat(\( [^)]+\) )?: /
9+ newPreReleasePattern = null // Not used - no prereleases
10+ promoteToReleasePattern = null // Not used - every merge is a release
11+ }
Original file line number Diff line number Diff line change 11rootProject.name = " hypertrace-otel-agent"
22
3+ pluginManagement {
4+ repositories {
5+ mavenLocal()
6+ gradlePluginPortal()
7+ maven(" https://dl.bintray.com/hypertrace/maven" )
8+ }
9+ }
10+
11+ plugins {
12+ id(" org.hypertrace.version-settings" ) version " 0.1.5"
13+ }
14+
315include(" :javaagent" )
416include(" instrumentation" )
517include(" instrumentation:servlet:servlet-common" )
You can’t perform that action at this time.
0 commit comments