DBZ-3069 New Maven infra for release

This commit is contained in:
Jiri Pechanec 2021-02-15 12:26:06 +01:00 committed by Gunnar Morling
parent c7850e8614
commit dadaaa4212
2 changed files with 31 additions and 26 deletions

View File

@ -69,7 +69,7 @@ DEBEZIUM_ADDITIONAL_REPOSITORIES.split().each {
IMAGES = ['connect', 'connect-base', 'examples/mysql', 'examples/mysql-gtids', 'examples/postgres', 'examples/mongodb', 'kafka', 'server', 'zookeeper']
MAVEN_CENTRAL = 'https://repo1.maven.org/maven2'
STAGING_REPO = 'https://oss.sonatype.org/content/repositories'
STAGING_REPO = 'https://s01.oss.sonatype.org/content/repositories'
STAGING_REPO_ID = null
ADDITIONAL_STAGING_REPO_ID = [:]
LOCAL_MAVEN_REPO = "$HOME_DIR/.m2/repository"
@ -575,6 +575,7 @@ node('Slave') {
}
stage('Merge candidates to the master') {
if (!DRY_RUN) {
dir(DEBEZIUM_DIR) {
withCredentials([usernamePassword(credentialsId: GIT_CREDENTIALS_ID, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
sh """
@ -585,7 +586,6 @@ node('Slave') {
git push --delete https://\${GIT_USERNAME}:\${GIT_PASSWORD}@$DEBEZIUM_REPOSITORY $CANDIDATE_BRANCH
"""
}
}
ADDITIONAL_REPOSITORIES.each { id, repo ->
dir(id) {
sh "git pull --rebase $CANDIDATE_BRANCH && git checkout master && git rebase $CANDIDATE_BRANCH"
@ -601,6 +601,8 @@ node('Slave') {
}
}
}
}
}
} finally {
mail to: 'jpechane@redhat.com', subject: "${JOB_NAME} run #${BUILD_NUMBER} finished", body: "Run ${BUILD_URL} finished with result: ${currentBuild.currentResult}"

View File

@ -165,6 +165,9 @@
<!-- Skip the API checks by default. Let the modules opt in. -->
<revapi.skip>true</revapi.skip>
<!-- Which Maven Central infra should be used -->
<release.endpoint>https://s01.oss.sonatype.org/</release.endpoint>
</properties>
<modules>
@ -191,7 +194,7 @@
<repository>
<id>ossrh</id>
<name>Sonatype Staging Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
<url>${release.endpoint}/service/local/staging/deploy/maven2</url>
</repository>
<snapshotRepository>
<id>ossrh</id>
@ -213,7 +216,7 @@
<repository>
<id>ossrh</id>
<name>OSS Sonatype Nexus</name>
<url>https://oss.sonatype.org/content/groups/public/</url>
<url>${release.endpoint}/content/groups/public/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
@ -759,7 +762,7 @@
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<nexusUrl>${release.endpoint}</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>