Skip to content

Commit 320a567

Browse files
authored
Moves build to Sonatype publishing (#1267)
This makes publication the same as Zipkin, which no longer uses bintray.
1 parent f7db2bf commit 320a567

File tree

21 files changed

+306
-272
lines changed

21 files changed

+306
-272
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,3 @@ target/
2424
.classpath
2525
.project
2626
.settings/
27-
28-
# Maven Wrapper
29-
.mvn/wrapper/maven-wrapper.jar

.mvn/wrapper/MavenWrapperDownloader.java

Lines changed: 0 additions & 117 deletions
This file was deleted.

.mvn/wrapper/maven-wrapper.jar

49.5 KB
Binary file not shown.

.settings.xml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2013-2019 The OpenZipkin Authors
4+
Copyright 2013-2020 The OpenZipkin Authors
55
66
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
77
in compliance with the License. You may obtain a copy of the License at
@@ -15,24 +15,18 @@
1515
1616
-->
1717
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18-
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
19-
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
18+
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
19+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
2020
http://maven.apache.org/xsd/settings-1.0.0.xsd">
2121
<servers>
2222
<server>
23-
<id>sonatype</id>
24-
<username>${env.SONATYPE_USER}</username>
25-
<password>${env.SONATYPE_PASSWORD}</password>
26-
</server>
27-
<server>
28-
<id>bintray</id>
29-
<username>${env.BINTRAY_USER}</username>
30-
<password>${env.BINTRAY_KEY}</password>
23+
<id>gpg.passphrase</id>
24+
<passphrase>${env.GPG_PASSPHRASE}</passphrase>
3125
</server>
3226
<server>
33-
<id>jfrog-snapshots</id>
34-
<username>${env.BINTRAY_USER}</username>
35-
<password>${env.BINTRAY_KEY}</password>
27+
<id>ossrh</id>
28+
<username>${env.SONATYPE_USER}</username>
29+
<password>${env.SONATYPE_PASSWORD}</password>
3630
</server>
3731
<server>
3832
<id>github.com</id>

.travis.yml

Lines changed: 61 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,49 @@ cache:
44
directories:
55
- $HOME/.m2
66

7+
# Don't do a shallow clone to allow license plugin to correctly read git history.
8+
git:
9+
depth: false
10+
711
language: java
812

913
jdk: openjdk14
1014

15+
services:
16+
- docker
17+
# MySQL tests currently use OS managed mysql
18+
- mysql
19+
1120
before_install:
12-
# Disable testcontainers checks
13-
- echo checks.disable=true > ~/.testcontainers.properties
14-
# allocate commits to CI, not the owner of the deploy key
15-
- git config user.name "zipkinci"
16-
- git config user.email "[email protected]"
17-
# setup https authentication credentials, used by ./mvnw release:prepare
18-
- git config credential.helper "store --file=.git/credentials"
19-
- echo "https://$GH_TOKEN:@github.com" > .git/credentials
20-
21-
# Override default travis to use the maven wrapper; skip license on travis due to #1512
22-
install: ./mvnw install -DskipTests=true -Dlicense.skip=true -Dmaven.javadoc.skip=true -B -V
21+
- |
22+
# Cache as help:evaluate is not quick
23+
export POM_VERSION=$(./mvnw help:evaluate -N -Dexpression=project.version -q -DforceStdout)
24+
25+
# Disable testcontainers checks
26+
echo checks.disable=true > ~/.testcontainers.properties
27+
- |
28+
# Credentials entered into https://travis-ci.org/github/openzipkin/${REPO}/settings are access
29+
# controlled by branch (typically only master). Check to see if a well-known env is available
30+
# before attempting to log in.
31+
if [[ -n "$SONATYPE_USER" ]]; then
32+
# allocate commits to CI, not the owner of the deploy key
33+
git config user.name "zipkinci"
34+
git config user.email "[email protected]"
35+
36+
# setup https authentication credentials, used by ./mvnw release:prepare
37+
git config credential.helper "store --file=.git/credentials"
38+
echo "https://$GH_TOKEN:@github.com" > .git/credentials
39+
40+
# ensure GPG commands work non-interactively
41+
export GPG_TTY=$(tty)
42+
# import signing key used for jar files
43+
echo ${GPG_SIGNING_KEY} | base64 --decode | gpg --batch --passphrase ${GPG_PASSPHRASE} --import
44+
fi
45+
46+
install:
47+
- |
48+
# use a go-offline that properly works with multi-module builds
49+
./mvnw -q --batch-mode -nsu -Prelease de.qaware.maven:go-offline-maven-plugin:resolve-dependencies
2350
script: ./travis/publish.sh
2451

2552
# Don't build release tags. This avoids publish conflicts because the version commit exists both on master and the release tag.
@@ -32,19 +59,29 @@ notifications:
3259
webhooks:
3360
urls:
3461
- https://webhooks.gitter.im/e/ead3c37d57527214e9f2
35-
- https://webhooks.gitter.im/e/e57478303f87ecd7bffc
62+
- https://webhooks.gitter.im/e/9f1ee2f315d32956f8d6
3663
on_success: change
3764
on_failure: always
3865

39-
env:
40-
global:
41-
# Ex. travis encrypt BINTRAY_USER=your_github_account
42-
- secure: "Xg7ERaJ+8TFkg/lBG6KSKwpQ/Wmw8/TdvyHagphCpGtlp8uAM92igOvXAWvzgnnQxmcPh9Ks0Z5/dJuSVTtxydIqKkac3LXa4AucHe7sxJSHBwFSy0WuWN4Apuvp3uglantjwxc+OEKF9LYI5IgEWW3IS7UD7zvlXPuJ0AjdeP0="
43-
# Ex. travis encrypt BINTRAY_KEY=xxx-https://bintray.com/profile/edit-xxx --add
44-
- secure: "ipXMdXTjN7Ilg+bxjYFXixrBVT5dr/TFKIMH54vCuirrPXkvccCXaMCndk+eN+pprlgjcNBqtb0j/TGAfasdX0jSxOeyAUv5E0hxuXDURZ/OQUEpo7YMjLXrAT1/lg8f343TLJnjujeyuabvMdmFcY9o6HWc+MqB4ZGzNgYNiQo="
45-
# Ex. travis encrypt GH_TOKEN=XXX-https://github.com/settings/tokens-XXX --add
46-
- secure: "PpQs4Eje8IYrCzLBWEv5nc2RL7XPubwhlFps4MO/LUvDg05cJpX4/rj5D0C99O9X9V9RnkDrvDkGxG02dwxZ6E1ciPheL7sGVDYlG75yDNipdSFGErNNH1W1wy4Q4PFbNg0i+vOB7MZas+MyGTZi7aZieX2f/ikVZvieCYoWwh8="
47-
# Ex. travis encrypt SONATYPE_USER=your_sonatype_account
48-
- secure: "Z6aQmONN3znLNtaMdt4ycoyHGdVqSC9W8N3FluZZFFYcoqhtR+p4RMWjpgloQHPZadLLuJIUijQgCYELCAFFkaIcanytIxWnVgK5/qpdfv7Vx52d5mwyCGq3jFtreVRNsd/4g6vkStr4nRf0+dZcDA4Y10CAlsZloF9ETPqQmco="
49-
# Ex. travis encrypt SONATYPE_PASSWORD=your_sonatype_password
50-
- secure: "GY48c/XSiQ87QC7HadzzdXKeymnLYdkwrWliaZzD2djSOv2pgmDMrW05jxIN+81B4w9CcM8R18KsUjpkATWKIctl/+/9sXMlQcvRMdM3EFA66RJA7tg4BjRjRwSv7YQ+935dbCHB/C8Zw05TkUQMpbqtGzjpckGIhNViyOJWYIU="
66+
# Secure variables needed for release and publication
67+
#
68+
# When Travis, add to https://travis-ci.org/github/openzipkin/${REPO}/settings
69+
#
70+
# GH_TOKEN=XXX-https://github.com/settings/tokens-XXX
71+
# - makes release commits and tags, also writes to GHCR if Docker
72+
# - needs repo:status, public_repo and if Docker write:packages, delete:packages
73+
# - referenced in .settings.xml
74+
# - store like this: echo "https://$GH_TOKEN:@github.com" > .git/credentials
75+
# GPG_SIGNING_KEY=$(gpg -a --export-secret-keys [email protected] |base64)
76+
# - used to sign jars in release commands
77+
# - sent to keyserver.ubuntu.com
78+
# - import like this: echo ${GPG_SIGNING_KEY} | base64 --decode | gpg --batch --passphrase ${GPG_PASSPHRASE} --import
79+
# GPG_PASSPHRASE=passphrase_for_GPG_SIGNING_KEY
80+
# - referenced in .settings.xml
81+
# SONATYPE_USER=your_sonatype_account_token
82+
# - used to publish to Maven Central via https://oss.sonatype.org/#stagingRepositories
83+
# - needs access to io.zipkin via https://issues.sonatype.org/browse/OSSRH-16669
84+
# - generate via https://oss.sonatype.org/#profile;User%20Token
85+
# - referenced in .settings.xml
86+
# SONATYPE_PASSWORD=password_to_SONATYPE_USER
87+
# - referenced in .settings.xml

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ All artifacts publish to the group ID "io.zipkin.brave". We use a common
6262
release version for all components.
6363

6464
### Library Releases
65-
Releases are uploaded to [Bintray](https://bintray.com/openzipkin/maven/zipkin) and synchronized to [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.zipkin.brave%22)
65+
Releases are at [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.zipkin.brave%22)
66+
6667
### Library Snapshots
67-
Snapshots are uploaded to [JFrog](https://oss.jfrog.org/artifactory/oss-snapshot-local) after commits to master.
68+
Snapshots are uploaded to [Sonatype](https://oss.sonatype.org/content/repositories/snapshots) after
69+
commits to master.
70+
6871
### Version alignments
6972
When using multiple brave components, you'll want to align versions in
7073
one place. This allows you to more safely upgrade, with less worry about

0 commit comments

Comments
 (0)