forked from payara/Payara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile-MicroProfile
164 lines (162 loc) · 7.69 KB
/
Jenkinsfile-MicroProfile
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#!groovy
// Jenkinsfile for building a PR and running the MicroProfile TCK tests against it
def pom
def payaraBuildNumber
pipeline {
options {
disableConcurrentBuilds()
}
agent any
tools {
jdk "zulu-8"
}
stages {
stage('Report') {
steps {
script{
pom = readMavenPom file: 'pom.xml'
payaraBuildNumber = "PR${env.ghprbPullId}#${currentBuild.number}"
echo "Payara pom version is ${pom.version}"
echo "Build number is ${payaraBuildNumber}"
}
}
}
stage('Build') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Building SRC *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh """mvn -B -V -ff -e clean install -PQuickBuild \
-Djavax.net.ssl.trustStore=${env.JAVA_HOME}/jre/lib/security/cacerts \
-Djavax.xml.accessExternalSchema=all -Dbuild.number=${payaraBuildNumber}\
-Dfailsafe.rerunFailingTestsCount=2"""
echo '*#*#*#*#*#*#*#*#*#*#*#*# Built SRC *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
post{
success{
archiveArtifacts artifacts: 'appserver/distributions/payara/target/payara.zip', fingerprint: true
archiveArtifacts artifacts: 'appserver/extras/payara-micro/payara-micro-distribution/target/payara-micro.jar', fingerprint: true
}
}
}
stage('Checkout MicroProfile TCK Runners') {
steps{
echo '*#*#*#*#*#*#*#*#*#*#*#*# Checking out MicroProfile TCKs *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
checkout changelog: false, poll: false, scm: [$class: 'GitSCM',
branches: [[name: "*/master"]],
userRemoteConfigs: [[url: "https://github.com/payara/MicroProfile-TCK-Runners.git"]]]
echo '*#*#*#*#*#*#*#*#*#*#*#*# Checked out MicroProfile TCKs *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
}
stage('Run MicroProfile Config TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Running Config TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean verify -f MicroProfile-Config/tck-runner/pom.xml \
-Dfailsafe.rerunFailingTestsCount=2 -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran Config TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
post {
always {
junit '**/target/failsafe-reports/*.xml'
}
}
}
stage('Run MicroProfile Fault Tolerance TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Running Fault Tolerance TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean verify -f MicroProfile-Fault-Tolerance/tck-runner/pom.xml \
-Dfailsafe.rerunFailingTestsCount=2 -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran Fault Tolerance TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
post {
always {
junit '**/target/failsafe-reports/*.xml'
}
}
}
stage('Run MicroProfile Health TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Installing MP Health TCK Arquillian Extension *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean install -f MicroProfile-Health/tck-arquillian-extension/pom.xml \
-Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Installed MP Health TCK Arquillian Extension *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
echo '*#*#*#*#*#*#*#*#*#*#*#*# Running Health TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean verify -f MicroProfile-Health/tck-runner/pom.xml \
-Dfailsafe.rerunFailingTestsCount=2 -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran Health TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
post {
always {
junit '**/target/failsafe-reports/*.xml'
}
}
}
stage('Run MicroProfile JWT-Auth TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Installing MP JWT-Auth TCK Arquillian Extension *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean install -f MicroProfile-JWT-Auth/tck-arquillian-extension/pom.xml \
-Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Installed MP JWT-Auth TCK Arquillian Extension *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
echo '*#*#*#*#*#*#*#*#*#*#*#*# Running JWT-Auth TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean verify -f MicroProfile-JWT-Auth/tck-runner/pom.xml \
-Dfailsafe.rerunFailingTestsCount=2 -Punstable -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran JWT-Auth TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
post {
always {
junit '**/target/failsafe-reports/*.xml'
}
}
}
stage('Run MicroProfile Metrics TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Running Metrics TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean verify -f MicroProfile-Metrics/tck-runner/pom.xml \
-Dfailsafe.rerunFailingTestsCount=2 -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran Metrics TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
post {
always {
junit '**/target/failsafe-reports/*.xml'
}
}
}
stage('Run MicroProfile OpenAPI TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Running OpenAPI TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean verify -f MicroProfile-OpenAPI/tck-runner/pom.xml \
-Dfailsafe.rerunFailingTestsCount=2 -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran OpenAPI TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
post {
always {
junit '**/target/failsafe-reports/*.xml'
}
}
}
stage('Run MicroProfile OpenTracing TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Running OpenTracing TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean verify -f MicroProfile-OpenTracing/tck-runner/pom.xml \
-Dfailsafe.rerunFailingTestsCount=2 -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran OpenTracing TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
post {
always {
junit '**/target/failsafe-reports/*.xml'
}
}
}
stage('Run MicroProfile Rest Client TCK') {
steps {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Running Rest Client TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh "mvn -B -V -ff -e clean verify -f MicroProfile-Rest-Client/tck-runner/pom.xml \
-Dfailsafe.rerunFailingTestsCount=2 -Dpayara.version=${pom.version}"
echo '*#*#*#*#*#*#*#*#*#*#*#*# Ran Rest Client TCK *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
post {
always {
junit '**/target/failsafe-reports/*.xml'
}
}
}
}
}