DBZ-3069 New Maven infra for release
This commit is contained in:
parent
c7850e8614
commit
dadaaa4212
@ -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,28 +575,30 @@ node('Slave') {
|
||||
}
|
||||
|
||||
stage('Merge candidates to the master') {
|
||||
dir(DEBEZIUM_DIR) {
|
||||
withCredentials([usernamePassword(credentialsId: GIT_CREDENTIALS_ID, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
|
||||
sh """
|
||||
git pull --rebase https://\${GIT_USERNAME}:\${GIT_PASSWORD}@$DEBEZIUM_REPOSITORY $CANDIDATE_BRANCH && \\
|
||||
git checkout master && \\
|
||||
git rebase $CANDIDATE_BRANCH && \\
|
||||
git push https://\${GIT_USERNAME}:\${GIT_PASSWORD}@$DEBEZIUM_REPOSITORY HEAD:$DEBEZIUM_BRANCH && \\
|
||||
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"
|
||||
withCredentials([usernamePassword(credentialsId: GIT_CREDENTIALS_ID, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
|
||||
sh """
|
||||
git pull --rebase ${repo.git} $CANDIDATE_BRANCH && \\
|
||||
git checkout master && \\
|
||||
git rebase $CANDIDATE_BRANCH && \\
|
||||
git push https://\${GIT_USERNAME}:\${GIT_PASSWORD}@${repo.git} HEAD:${repo.branch} && \\
|
||||
git push --delete https://\${GIT_USERNAME}:\${GIT_PASSWORD}@${repo.git} $CANDIDATE_BRANCH
|
||||
"""
|
||||
if (!DRY_RUN) {
|
||||
dir(DEBEZIUM_DIR) {
|
||||
withCredentials([usernamePassword(credentialsId: GIT_CREDENTIALS_ID, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
|
||||
sh """
|
||||
git pull --rebase https://\${GIT_USERNAME}:\${GIT_PASSWORD}@$DEBEZIUM_REPOSITORY $CANDIDATE_BRANCH && \\
|
||||
git checkout master && \\
|
||||
git rebase $CANDIDATE_BRANCH && \\
|
||||
git push https://\${GIT_USERNAME}:\${GIT_PASSWORD}@$DEBEZIUM_REPOSITORY HEAD:$DEBEZIUM_BRANCH && \\
|
||||
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"
|
||||
withCredentials([usernamePassword(credentialsId: GIT_CREDENTIALS_ID, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
|
||||
sh """
|
||||
git pull --rebase ${repo.git} $CANDIDATE_BRANCH && \\
|
||||
git checkout master && \\
|
||||
git rebase $CANDIDATE_BRANCH && \\
|
||||
git push https://\${GIT_USERNAME}:\${GIT_PASSWORD}@${repo.git} HEAD:${repo.branch} && \\
|
||||
git push --delete https://\${GIT_USERNAME}:\${GIT_PASSWORD}@${repo.git} $CANDIDATE_BRANCH
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
9
pom.xml
9
pom.xml
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user