Skip to content

Commit b8f524d

Browse files
Add otelRelease task (#29)
* Update testcontainers dep version * Add bintry plugin for releases
1 parent 86aea60 commit b8f524d

File tree

4 files changed

+42
-1
lines changed

4 files changed

+42
-1
lines changed

RELEASE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,11 @@ production environments.
4040

4141
This task requires an account and API key for the OpenTelemetry Bintray organization. If you have been provided access
4242
and configured your key, please set the required environment variables detailed in the publish script plugin.
43+
44+
## `./gradlew otelRelease`
45+
46+
This task will invoke the [Bintray Plugin](https://github.com/bintray/gradle-bintray-plugin)
47+
and publish all applicable snapshot artifacts to https://dl.bintray.com/open-telemetry/maven/io/opentelemetry/contrib/,
48+
assuming the current version is not a snapshot. Syncing with Maven Central is not performed at this time.
49+
50+
Like `ossSnapshot`, this task requires an account and API key for the OpenTelemetry Bintray organization.

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
id 'com.diffplug.spotless' version '5.1.1'
33
id "com.github.johnrengelman.shadow" version "6.0.0" apply false
44
id "com.jfrog.artifactory" version "4.17.2" apply false
5+
id 'com.jfrog.bintray' version '1.8.5' apply false
56
}
67

78
description = 'OpenTelemetry Contrib libraries and utilities for the JVM'

contrib/jmx-metrics/jmx-metrics.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def versions = [
3535

3636
def deps = [
3737
slf4j : "org.slf4j:slf4j-api:${versions.slf4j}",
38-
testcontainers : "org.testcontainers:testcontainers:1.14.3",
38+
testcontainers : "org.testcontainers:testcontainers:1.15.1",
3939
]
4040

4141
dependencies {

gradle/publish.gradle

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apply plugin: 'maven-publish'
22
apply plugin: 'com.jfrog.artifactory'
3+
apply plugin: 'com.jfrog.bintray'
34

45
publishing {
56
repositories {
@@ -88,10 +89,41 @@ artifactory {
8889
}
8990
}
9091

92+
bintray {
93+
user = System.getenv('BINTRAY_USER')
94+
key = System.getenv('BINTRAY_API_KEY')
95+
publications = ['maven']
96+
publish = true
97+
98+
pkg {
99+
repo = 'maven'
100+
name = 'opentelemetry-java-contrib'
101+
userOrg = 'open-telemetry'
102+
licenses = ['Apache-2.0']
103+
vcsUrl = 'https://github.com/open-telemetry/opentelemetry-java-contrib.git'
104+
105+
githubRepo = 'open-telemetry/opentelemetry-java-contrib'
106+
107+
version {
108+
name = project.version
109+
gpg {
110+
sign = true
111+
}
112+
}
113+
}
114+
}
115+
91116
task ossSnapshot {
92117
artifactoryPublish {
93118
enabled = version.toString().contains('SNAPSHOT')
94119
publications('maven')
95120
}
96121
finalizedBy artifactoryPublish
97122
}
123+
124+
task otelRelease {
125+
bintrayUpload {
126+
enabled = !version.toString().contains('SNAPSHOT')
127+
}
128+
finalizedBy bintrayUpload
129+
}

0 commit comments

Comments
 (0)