-
Notifications
You must be signed in to change notification settings - Fork 0
/
Release-payara-arquillian.groovy
68 lines (63 loc) · 2.28 KB
/
Release-payara-arquillian.groovy
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
57
58
59
60
61
62
63
64
65
66
67
68
@Library('util') _l1
def tag_name = ""
def payara_version = '6.2024.6'
pipeline {
agent any
options {
disableConcurrentBuilds()
}
parameters {
string(name: 'Version', description: 'Version number to release', trim: true)
string(name: 'arquillian_version', description: 'Arquillian Core version', trim: true)
}
stages {
stage('Maven Info') {
steps {
script {
if (Version.empty || arquillian_version.empty) {
def msg = 'Version or Arquillian Core version cannot be empty'
currentBuild.description = msg
error msg
}
tag_name = "parent-payara-containers-$Version"
if (env.GIT_BRANCH.contains('payara5')) {
payara_version = '5.2022.5'
}
}
sh "mvn -V -N -B -ntp -C help:all-profiles"
script {
currentBuild.description = "Commit ${env.GIT_COMMIT[0..7]} Node $env.NODE_NAME"
}
}
}
stage('Maven - Update Versions') {
steps {
sh """
mvn -B -ntp -C -N versions:set-property -DgenerateBackupPoms=false \
-Dversion.arquillian_core=$arquillian_version \
-Dproperty=version.arquillian_core -DnewVersion=$arquillian_version
git commit -am "[Update Arquillian Core]" || exit 0
"""
}
}
stage('Maven - Release') {
steps {
sh """
mvn -B -ntp -C release:prepare release:perform \
-DreleaseVersion=$Version -Darguments=\"-DtrimStackTrace=false -Dmaven.install.skip=true \
-DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dversion.maven.enforcer.java.limit=28 \
-Dversion.payara=$payara_version \
-DaltDeploymentRepository=hope-nexus-artifacts::https://nexus.hope.nyc.ny.us/repository/maven-releases/\"
"""
}
}
}
post {
success {
sh "git push origin $tag_name"
}
failure {
sh "git tag -d $tag_name || true"
}
}
}