Skip to content

Commit f4cd2d7

Browse files
committed
[#2506] Use Jenkins lock to prevent multiple releases pushing to the hibernate.org at the same time
1 parent f2e7ec0 commit f4cd2d7

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

ci/release/Jenkinsfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,15 @@ pipeline {
239239
]) {
240240
sshagent( ['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net'] ) {
241241
dir( '.release/hibernate.org' ) {
242-
checkout scmGit(
243-
branches: [[name: '*/production']],
244-
extensions: [],
245-
userRemoteConfigs: [[credentialsId: 'ed25519.Hibernate-CI.github.com', url: 'https://github.com/hibernate/hibernate.org.git']]
246-
)
247-
sh "../scripts/website-release.sh ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION}"
242+
// Lock to avoid rejected pushes when multiple releases try to clone-commit-push
243+
lock('hibernate.org-git') {
244+
checkout scmGit(
245+
branches: [[name: '*/production']],
246+
extensions: [],
247+
userRemoteConfigs: [[credentialsId: 'ed25519.Hibernate-CI.github.com', url: 'https://github.com/hibernate/hibernate.org.git']]
248+
)
249+
sh "../scripts/website-release.sh ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION}"
250+
}
248251
}
249252
}
250253
}

0 commit comments

Comments
 (0)