diff --git a/ci/pipeline.yml b/ci/pipeline.yml index cefdb2154c..ad30ad8a5d 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -528,8 +528,8 @@ jobs: params: BINTRAY_USERNAME: ((bintray-username)) BINTRAY_PASSWORD: ((bintray-password)) - SONATYPE_USERNAME: ((sonatype-username)) - SONATYPE_PASSWORD: ((sonatype-password)) + SONATYPE_USER_TOKEN: ((sonatype-user-token)) + SONATYPE_PASSWORD_TOKEN: ((sonatype-user-token-password)) BINTRAY_SUBJECT: ((bintray-subject)) BINTRAY_REPO: ((bintray-repo)) groups: diff --git a/ci/scripts/sync-to-maven-central.sh b/ci/scripts/sync-to-maven-central.sh index d644c3bf9c..073c73bb5d 100755 --- a/ci/scripts/sync-to-maven-central.sh +++ b/ci/scripts/sync-to-maven-central.sh @@ -12,7 +12,7 @@ echo "Syncing ${buildName}/${buildNumber} to Maven Central" --connect-timeout 240 \ --max-time 2700 \ -u ${BINTRAY_USERNAME}:${BINTRAY_PASSWORD} \ - -H "Content-Type: application/json" -d "{\"username\": \"${SONATYPE_USERNAME}\", \"password\": \"${SONATYPE_PASSWORD}\"}" \ + -H "Content-Type: application/json" -d "{\"username\": \"${SONATYPE_USER_TOKEN}\", \"password\": \"${SONATYPE_PASSWORD_TOKEN}\"}" \ -f \ -X \ POST "https://api.bintray.com/maven_central_sync/${BINTRAY_SUBJECT}/${BINTRAY_REPO}/${groupId}/versions/${version}" > /dev/null || { echo "Failed to sync" >&2; exit 1; } diff --git a/ci/tasks/sync-to-maven-central.yml b/ci/tasks/sync-to-maven-central.yml index f61d022ce5..51235b0a97 100644 --- a/ci/tasks/sync-to-maven-central.yml +++ b/ci/tasks/sync-to-maven-central.yml @@ -8,7 +8,7 @@ params: BINTRAY_SUBJECT: BINTRAY_USERNAME: BINTRAY_PASSWORD: - SONATYPE_USERNAME: - SONATYPE_PASSWORD: + SONATYPE_USER_TOKEN: + SONATYPE_PASSWORD_TOKEN: run: path: git-repo/ci/scripts/sync-to-maven-central.sh