From e5c62e665c7d289fdb0251ba3e9d038e1a534efd Mon Sep 17 00:00:00 2001 From: Jonatan Ivanov Date: Sun, 14 Mar 2021 20:54:43 -0700 Subject: [PATCH 1/2] Enforce signing artifacts if circleci runs the deploy stage. (#2503) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 58a639f1bd..4b0ee63ddc 100644 --- a/build.gradle +++ b/build.gradle @@ -107,7 +107,7 @@ subprojects { } signing { - required = hasProperty('SIGNING_KEY') + required = System.env.CIRCLE_STAGE == 'deploy' useInMemoryPgpKeys(findProperty('SIGNING_KEY'), findProperty('SIGNING_PASSWORD')) sign publishing.publications.nebula } From 3719f39fe14a5e778f64e27aaa82438ae30d5dd2 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Mon, 15 Mar 2021 13:06:38 +0900 Subject: [PATCH 2/2] Remove maven-central-sync job (#2502) Removes the job for syncing from Bintray to Maven Central since we will no longer publish releases to Bintray (due to it being sunset). Also removes a script for the same purpose. See #2455 Co-authored-by: Tommy Ludwig <8924140+shakuzen@users.noreply.github.com> --- .circleci/config.yml | 28 ----------------- scripts/sync-to-maven-central.sh | 53 -------------------------------- 2 files changed, 81 deletions(-) delete mode 100755 scripts/sync-to-maven-central.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 877c328dda..5f04fb76b2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,21 +53,6 @@ jobs: name: Deployment command: sh ./gradle/deploy.sh - maven-central-sync: - docker: - - image: circleci/openjdk:11-jdk - steps: - - checkout - - run: - name: Decrypt properties - command: openssl aes-256-cbc -d -in gradle.properties.enc -out gradle.properties -k "$KEY" -md sha256 - - deploy: - name: Maven Central sync - # arbitrarily choose one project to run the `mavenCentralSync` task since all use the same Bintray package - command: ./gradlew :micrometer-core:mavenCentralSync -Prelease.useLastTag=true -x bintrayPublish -x bintrayUpload -x bintrayCreateVersion -x bintrayCreatePackage - # Maven Central Sync might take more than 10 minutes - no_output_timeout: 30m - workflows: version: 2 build_prs_deploy_snapshots: @@ -95,16 +80,3 @@ workflows: filters: tags: only: /^v\d+\.\d+\.\d+(-rc\.\d+)?$/ - - staging-approval: - type: approval - requires: - - deploy - filters: - tags: - only: /^v\d+\.\d+\.\d+(-rc\.\d+)?$/ - - maven-central-sync: - requires: - - staging-approval - filters: - tags: - only: /^v\d+\.\d+\.\d+(-rc\.\d+)?$/ diff --git a/scripts/sync-to-maven-central.sh b/scripts/sync-to-maven-central.sh deleted file mode 100755 index 957240067d..0000000000 --- a/scripts/sync-to-maven-central.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -set -e - -if [[ -z "$VERSION" ]] -then - echo "\$VERSION must be set." - exit -1 -else - echo "Syncing version $VERSION" -fi - -MODULES=( - micrometer-core - micrometer-test - micrometer-registry-atlas - micrometer-registry-cloudwatch - micrometer-registry-cloudwatch2 - micrometer-registry-datadog - micrometer-registry-ganglia - micrometer-registry-graphite - micrometer-registry-influx - micrometer-registry-jmx - micrometer-registry-new-relic - micrometer-registry-prometheus - micrometer-registry-signalfx - micrometer-registry-statsd - micrometer-registry-wavefront - micrometer-spring-legacy - micrometer-jersey2 - micrometer-registry-stackdriver - micrometer-registry-elastic - micrometer-registry-kairos - micrometer-registry-dynatrace - micrometer-registry-humio - micrometer-registry-azure-monitor - micrometer-registry-appoptics -) - -for module in "${MODULES[@]}" -do - : - echo "Syncing ${module}" - curl \ - -s \ - --connect-timeout 240 \ - --max-time 2700 \ - -u ${BINTRAY_USERNAME}:${BINTRAY_API_KEY} \ - -H "Content-Type: application/json" -d "{\"username\": \"${SONATYPE_USER_TOKEN}\", \"password\": \"${SONATYPE_PASSWORD_TOKEN}\"}" \ - -f \ - -X \ - POST "https://api.bintray.com/maven_central_sync/spring/jars/${module}/versions/${VERSION}" > /dev/null || { echo "Failed to sync" >&2; exit 1; } - echo " complete" -done \ No newline at end of file