Closed sjoerdtalsma closed 7 years ago
@adriancole provided a good starting point in the initial PR:
sure if you look at https://github.com/opentracing/opentracing-java/blob/master/pom.xml you'll notice plugins for release and central sync. This depends on a settings file which references environment variables https://github.com/opentracing/opentracing-java/blob/master/.settings.xml a release script https://github.com/opentracing/opentracing-java/tree/master/travis and a travis file that invokes it https://github.com/opentracing/opentracing-java/blob/master/.travis.yml
The release guide includes what people do to kick-off a release and how you encrypt values for the release task https://github.com/opentracing/opentracing-java/blob/master/RELEASE.md
You could move these instructions to a new issue and just remove the publishing bits from this pom in the mean time,
Are we going to accept rp #1? And start further discusses at there. Maybe it's ready?
Seems java-jaxrs has the same requirement, maybe look at this pull request: https://github.com/opentracing-contrib/java-jaxrs/pull/5
Created new pull request for this: https://github.com/opentracing-contrib/java-globaltracer/pull/6
Pull request merged. Build failed unfortunately with:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project opentracing-globaltracer: Failed to deploy artifacts: Could not transfer artifact io.opentracing.contrib:opentracing-globaltracer:jar:0.1.0-20170115.110435-1 from/to jfrog-snapshots (http://oss.jfrog.org/artifactory/oss-snapshot-local): Failed to transfer file: http://oss.jfrog.org/artifactory/oss-snapshot-local/io/opentracing/contrib/opentracing-globaltracer/0.1.0-SNAPSHOT/opentracing-globaltracer-0.1.0-20170115.110435-1.jar. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]
--> Re-encrypted my BINTRAY_USER
+ BINTRAY_KEY
credentials in .travis.yml
Build still fails with this same error.
@adriancole To confirm, I should use the BINTRAY_KEY
value from here, right?
I just (manually) created the java-globaltracer
package in bintray and requested jCenter oss access from there. I suspect that was missing, as it was set up for the opentracing-java
package.
@adriancole https://github.com/adriancole To confirm, I should use the BINTRAY_KEY value from here, right? [image: schermafbeelding 2017-01-15 om 12 10 48] https://cloud.githubusercontent.com/assets/2930348/21962071/dcc15e24-db1b-11e6-9b5c-7d1e7bab9d45.png
yeppers!
Hmm, I got a reply from bintray, seems like something is being published already:
Hi,
It appears your snapshots are already being hosted on oss.jfrog.org. They can be found under the path:
io/opentracing/contrib
If you would like to have a different path approved, please create a new inclusion request with the correct package path.
However, the Travis-CI job still fails with:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project opentracing-globaltracer: Failed to deploy artifacts: Could not transfer artifact io.opentracing.contrib:opentracing-globaltracer:jar:0.1.0-20170115.110435-1 from/to jfrog-snapshots (http://oss.jfrog.org/artifactory/oss-snapshot-local): Failed to transfer file: http://oss.jfrog.org/artifactory/oss-snapshot-local/io/opentracing/contrib/opentracing-globaltracer/0.1.0-SNAPSHOT/opentracing-globaltracer-0.1.0-20170115.110435-1.jar. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]
:flushed:
maybe double-check your encrypted credentials? or possibly try publishing snapshot locally? https://github.com/opentracing/opentracing-java/pull/90
Thanks @adriancole ! I'll try manually with unencrypted credentials from home this evening.
Manual publish with unencrypted credentials does the upload:
[INFO] Uploaded: http://oss.jfrog.org/artifactory/oss-snapshot-local/io/opentracing/contrib/opentracing-globaltracer/0.1.0-SNAPSHOT/maven-metadata.xml (2 KB at 3.5 KB/sec) [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS
Will re-re-re-encrypt my credentials :wink: and let travis try again.
Don't know why, but this time the build worked. The only difference is this time I used:
travis encrypt -r opentracing-contrib/java-globaltracer BINTRAY_USER=myname
instead of
travis encrypt BINTRAY_USER=myname -r opentracing-contrib/java-globaltracer
etc
Just in case, I'll re-encrypt the other variables too and add a release
maven profile for good measure, then I think we're good to go on this one?
BIG thank you to @adriancole 👍
thanks for testing the doc, and going for full self-service :) Everything's better off when multiple people have knowledge of how gears work.
On Tue, Jan 17, 2017 at 4:34 AM, Sjoerd Talsma notifications@github.com wrote:
BIG thank you to @adriancole https://github.com/adriancole 👍
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/opentracing-contrib/java-globaltracer/issues/2#issuecomment-272956302, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD614KISjNY7IJ71SzQsZpe9Q68iYYFks5rS9RagaJpZM4LS6Jq .
Hey,
I have just tried to release java-web-servlet-filter
. And it failed on
[ERROR] Failed to execute goal io.zipkin.centralsync-maven-plugin:centralsync-maven-plugin:0.1.0:sync (default-cli) on project opentracing-web-servlet-filter-parent: https://api.bintray.com/maven_central_sync/opentracing/maven/opentracing-web-servlet-filter/versions/0.0.2 failed: Response{protocol=http/1.1, code=403, message=Forbidden, url=https://api.bintray.com/maven_central_sync/opentracing/maven/opentracing-web-servlet-filter/versions/0.0.2} -> [Help 1]
It seems that maven package in bintray has to be manually configured to add it Bintray JCenter:
When you click on Maven Central
tab it shows pop up with link Click here to get it included.
========================= Update I received an email:
Hi,
An inclusion to JCenter always uses an allocated path prefix to avoid accidental file overwrites by other users. However, under the group id ‘/io/opentracing/contrib/' you included 2 artifactID: /io/opentracing/contrib/opentracing-web-servlet-filter-parent AND /io/opentracing/contrib/opentracing-web-servlet-filter
Please let us know which artifactID you would like to include in jcenter. Please note, if one artifact is dependency of the other, in order to let build succeed, there will be need to include both of the artifacts.
Kind Regards, JFrog Support
I asked for both artifactIDs
@pavolloffay @adriancole I am affraid I'm getting confused about bintray and jfrog/maven central promotion. Reading Deploying Snapshots to oss.jfrog.org didn't really help either.
Also, I have no clue what the (zipkin) centralsync plugin does, I'm guessing it automates this release promotion... Also I see the tab Maven Central
under my bintray package says
Sync to Maven Central is disabled since this package contains no published versions yet.
which suggests I should first create a release before I can request maven-central synchronization?
/ 😕 confused!
the only thing the maven central sync plugin is substitute for the sync to maven central UI flow (ex enter username and password and click sync). If that doesn't work manually, the sync plugin won't either.
Closing this issue.
Central sync was configured in bintray and release 0.1.0
succeeded using the travis publish script.
Publishing information should be added for this project.