Skip to content

Commit d2d0940

Browse files
committed
Lock around clone-commit-push in Jenkins release script
1 parent d54687b commit d2d0940

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
@@ -255,12 +255,15 @@ pipeline {
255255
]) {
256256
sshagent( ['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net'] ) {
257257
dir( '.release/hibernate.org' ) {
258-
checkout scmGit(
259-
branches: [[name: '*/production']],
260-
extensions: [],
261-
userRemoteConfigs: [[credentialsId: 'ed25519.Hibernate-CI.github.com', url: 'https://github.com/hibernate/hibernate.org.git']]
262-
)
263-
sh "../scripts/website-release.sh ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION}"
258+
// Lock to avoid rejected pushes when multiple releases try to clone-commit-push
259+
lock('hibernate.org-git') {
260+
checkout scmGit(
261+
branches: [[name: '*/production']],
262+
extensions: [],
263+
userRemoteConfigs: [[credentialsId: 'ed25519.Hibernate-CI.github.com', url: 'https://github.com/hibernate/hibernate.org.git']]
264+
)
265+
sh "../scripts/website-release.sh ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION}"
266+
}
264267
}
265268
}
266269
}

0 commit comments

Comments
 (0)