@@ -57,6 +57,15 @@ pipeline {
57
57
stage(' Release check' ) {
58
58
steps {
59
59
script {
60
+ // Avoid doing a release for commits from a release
61
+ def lastCommitter = sh(script : ' git show -s --format=\' %an\' ' , returnStdout : true )
62
+ def secondLastCommitter = sh(script : ' git show -s --format=\' %an\' HEAD~1' , returnStdout : true )
63
+ if (lastCommitter == ' Hibernate-CI' && secondLastCommitter == ' Hibernate-CI' ) {
64
+ print " INFO: Build skipped because last commits were for the previous release"
65
+ currentBuild. result = ' ABORTED'
66
+ return
67
+ }
68
+
60
69
dir(' .release/scripts' ) {
61
70
checkout scmGit(branches : [[name : ' */main' ]], extensions : [], userRemoteConfigs : [[credentialsId : ' ed25519.Hibernate-CI.github.com' , url : ' https://github.com/hibernate/hibernate-release-scripts.git' ]])
62
71
}
@@ -132,19 +141,6 @@ pipeline {
132
141
}
133
142
}
134
143
}
135
- // Done through Jira Automation
136
- // stage('Jira release') {
137
- // steps {
138
- // script {
139
- // dir('.release/scripts') {
140
- // checkout scmGit(branches: [[name: '*/main']], extensions: [], userRemoteConfigs: [[credentialsId: 'ed25519.Hibernate-CI.github.com', url: 'https://github.com/hibernate/hibernate-release-scripts.git']])
141
- // }
142
- // withCredentials([usernameColonPassword(credentialsId: 'jira-automation', variable: 'JIRA_API_TOKEN')]) {
143
- // sh ".release/scripts/jira-release.sh ${env.SCRIPT_OPTIONS} ${env.JIRA_KEY} ${env.VERSION_BASIS} ${env.NEXT_VERSION_BASIS}"
144
- // }
145
- // }
146
- // }
147
- // }
148
144
stage(' Publish release' ) {
149
145
steps {
150
146
script {
@@ -186,7 +182,7 @@ pipeline {
186
182
extensions : [],
187
183
userRemoteConfigs : [[credentialsId : ' ed25519.Hibernate-CI.github.com' , url : ' https://github.com/hibernate/hibernate.org.git' ]]
188
184
)
189
- sh " ../scripts/website-release.sh ${ env.SCRIPT_OPTIONS} ${ env.PROJECT} ${ env.VERSION_BASIS } "
185
+ sh " ../scripts/website-release.sh ${ env.SCRIPT_OPTIONS} ${ env.PROJECT} ${ env.RELEASE_VERSION } "
190
186
}
191
187
}
192
188
}
0 commit comments