-
-
Notifications
You must be signed in to change notification settings - Fork 245
Expand file tree
/
Copy pathJenkinsfile
More file actions
56 lines (52 loc) · 1.54 KB
/
Jenkinsfile
File metadata and controls
56 lines (52 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
@Library('hibernate-jenkins-pipeline-helpers') _
// Avoid running the pipeline on branch indexing
if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) {
print "INFO: Build skipped due to trigger being Branch Indexing"
currentBuild.result = 'NOT_BUILT'
return
}
pipeline {
agent {
label 'Release'
}
tools {
maven 'Apache Maven 3.9'
jdk 'OpenJDK 25 Latest'
}
options {
// Wait for 1h before publishing snapshots, in case there's more commits.
quietPeriod 3600
// In any case, never publish snapshots more than once per hour.
rateLimitBuilds(throttle: [count: 1, durationName: 'hour', userBoost: true])
buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3'))
disableConcurrentBuilds(abortPrevious: false)
}
stages {
stage('Publish') {
steps {
script {
withMaven(mavenSettingsConfig: 'ci-hibernate.deploy.settings.maven', mavenLocalRepo: env.WORKSPACE_TMP + '/.m2repository') {
dir('.release/scripts') {
sh 'git clone https://github.com/hibernate/hibernate-release-scripts.git .'
}
def version = sh(
script: ".release/scripts/determine-current-version.sh search",
returnStdout: true
).trim()
echo "Current version: '${version}'"
sh "bash -xe .release/scripts/snapshot-deploy.sh search ${version}"
}
}
}
}
}
post {
always {
notifyBuildResult notifySuccessAfterSuccess: false, maintainers: 'marko@hibernate.org'
}
}
}