-
Notifications
You must be signed in to change notification settings - Fork 23
/
Jenkinsfile
82 lines (82 loc) · 2.74 KB
/
Jenkinsfile
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
pipeline {
agent { label 'linux' }
tools {
jdk 'oracle-java-11'
}
parameters {
string(name: 'wfRepo', description: 'WildFly repository', defaultValue: "https://github.com/wildfly/wildfly.git" )
string(name: 'wfBranch', description: 'WildFly branch', defaultValue: "master" )
string(name: 'tsRepo', description: 'WildFly repository', defaultValue: "https://github.com/jboss-eap-qe/eap-microprofile-test-suite.git" )
string(name: 'tsBranch', description: 'WildFly branch', defaultValue: "master" )
}
options {
timestamps()
ansiColor("xterm")
buildDiscarder(logRotator(numToKeepStr: '15'))
}
stages {
stage('Checkout') {
steps {
echo "${params.wfBranch} - ${params.wfRepo}"
dir('wildfly') {
git branch: "${params.wfBranch}", url: "${params.wfRepo}"
}
dir('eap-microprofile-test-suite') {
git branch: "${params.tsBranch}", url: "${params.tsRepo}"
}
}
}
stage ('Path / Java info') {
steps {
sh '''
echo "PATH = ${PATH}"
which java
'''
}
}
stage('Build WildFly') {
steps {
sh '''
cd wildfly
./mvnw -B clean install -DskipTests -Denforcer.skip=true -Dcheckstyle.skip=true
'''
}
}
stage('Run MP TS') {
steps {
sh '''
WF_RELATIVE_PATH=`find wildfly/dist/target -mindepth 1 -maxdepth 1 -type d | grep "target/wildfly"`
WF_HOME=${PWD}/${WF_RELATIVE_PATH}
cd eap-microprofile-test-suite
./mvnw -B clean verify -Denforcer.skip=true -Djboss.dist=$WF_HOME
'''
}
}
stage('Reports') {
parallel {
stage('Disk usage') {
steps {
sh 'du -cskh */*'
}
}
stage('Archive artifacts') {
steps {
archiveArtifacts artifacts: '**/target/*-reports/TEST*.xml', fingerprint: false
}
}
stage("Build desctiption") {
steps {
script {
currentBuild.description = "${params.wfRepo} - ${params.wfBranch}\n${params.tsRepo} - ${params.tsBranch}"
}
}
}
}
}
}
post {
always {
deleteDir()
}
}
}