From 6fc84c16ba27e9ed37d577c7e5f8ae8503f86305 Mon Sep 17 00:00:00 2001 From: Serrania Kylian Date: Mon, 17 Jun 2019 10:22:47 +0200 Subject: [PATCH] [circleci] Sync releases with mavencentral (#234) Currently, the JMXFetch releases are only put on bintray. Adds a step in the deploy job that uses bintray's "Sync with Maven Central" feature to also release JMXFetch on Maven Central. --- .circleci/config.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9f2297e8c..5bba32761 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,8 +59,18 @@ jobs: - attach_workspace: at: . - - run: mvn validate jar:jar source:jar javadoc:jar assembly:single deploy:deploy -e --settings ./settings.xml - + - run: + name: Deploy to bintray + command: mvn validate jar:jar source:jar javadoc:jar assembly:single deploy:deploy -e --settings ./settings.xml + - run: + name: Sync with mavencentral + command: | + VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + curl -X POST -H "Content-Type: application/json" \ + --user ${BINTRAY_USER}:${BINTRAY_API_KEY} \ + --data "{\"username\":\"${SONATYPE_USER}\", \"password\":\"${SONATYPE_PWD}\"}" \ + https://api.bintray.com/maven_central_sync/datadog/datadog-maven/jmxfetch/versions/$VERSION + workflows: version: 2 build_test_deploy: