This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile-Quarkus-quickstarts
96 lines (94 loc) · 3.12 KB
/
Jenkinsfile-Quarkus-quickstarts
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
pipeline {
agent any
triggers {
cron('H H(21-23) */2 * *')
}
tools {
jdk 'graalvm'
}
options {
timestamps()
ansiColor("xterm")
buildDiscarder(logRotator(numToKeepStr: '15'))
}
stages {
stage('Checkout') {
steps {
git branch: 'development', url: 'https://github.com/quarkusio/quarkus-quickstarts'
}
}
stage ('Initialize') {
steps {
sh '''
echo "PATH = ${PATH}"
which java
'''
}
}
stage('Test JVM') {
options {
timeout(time: 30, unit: 'MINUTES')
}
steps {
sh 'TESTCONTAINERS_RYUK_DISABLED=true ./mvnw -fn clean verify'
}
post {
always {
junit '**/target/*-reports/TEST*.xml'
sh '''
for i in `find . | grep 'runner.jar$' | sort`; do
QS_DIR="$(dirname $(dirname $i))"
LIB_DIR="`dirname $i`/lib"
LIB_SIZE=`du -k $LIB_DIR | cut -f1`
LIB_COUNT=`ls -1 $LIB_DIR | wc -l | sed "s/ //g"`
echo "$QS_DIR,$LIB_COUNT files,$LIB_SIZE Kbyte,in $LIB_DIR"
done > disk-usage-jvm-tmp.txt
column -t -s',' disk-usage-jvm-tmp.txt > disk-usage-jvm.txt
rm disk-usage-jvm-tmp.txt
'''
}
}
}
stage('Test Native') {
options {
timeout(time: 3, unit: 'HOURS')
}
steps {
sh 'GRAALVM_HOME=$JAVA_HOME TESTCONTAINERS_RYUK_DISABLED=true ./mvnw -fn clean verify -Dnative'
}
post {
always {
junit '**/target/*-reports/TEST*.xml'
sh '''
for i in `find . | grep 'runner$' | grep -v "wiring-classes" | grep -v "test-classes" | grep -v "generated-sources" | sort`; do
QS_DIR="`dirname $i`"
NATIVE_SIZE=`du -m $i | cut -f1`
echo "$QS_DIR,$NATIVE_SIZE Mbyte"
done > disk-usage-native-tmp.txt
column -t -s',' disk-usage-native-tmp.txt > disk-usage-native.txt
rm disk-usage-native-tmp.txt
'''
}
}
}
stage('Reports') {
parallel {
stage('Disk usage') {
steps {
sh 'du -cskh */*'
}
}
stage('Archive artifacts') {
steps {
archiveArtifacts artifacts: '**/target/*-reports/TEST*.xml,disk-usage-jvm.txt,disk-usage-native.txt', fingerprint: false
}
}
}
}
}
post {
always {
cleanWs()
}
}
}