-
Notifications
You must be signed in to change notification settings - Fork 22
/
Jenkinsfile
46 lines (46 loc) · 1.56 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
pipeline {
agent any
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '2', artifactNumToKeepStr: '2'))
}
stages {
stage('cleanup') {
steps {
sh 'sh ./src/main/resources/scripts/jenkins.cleanup.sh'
sh '/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.6.1/bin/mvn clean'
}
}
stage('build') {
steps {
sh 'JAVA_HOME=/usr/lib/jvm/java-11-openjdk /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.6.1/bin/mvn install -Denv=installer_template'
sh 'sh ./src/main/resources/scripts/jenkins.build.sh'
}
post {
success {
archiveArtifacts 'src/main/resources/setup/target/*.tgz'
}
}
}
stage('install') {
steps {
sh 'sh ./src/main/resources/scripts/jenkins.install.sh'
sh 'sudo systemctl start wildfly-26.1.3.Final@standalone'
sh 'sh ./src/main/resources/scripts/jenkins.checkgp.sh'
}
}
stage('test') {
steps {
sh 'cd ./integration-test; /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.6.1/bin/mvn clean test'
}
post {
always {
junit 'integration-test/target/surefire-reports/*.xml'
sh 'tar -cvf ./integration-test/target/surefire-reports.tar ./integration-test/target/surefire-reports/ --transform s#./integration-test/target/##'
sh 'gzip ./integration-test/target/surefire-reports.tar'
archiveArtifacts 'integration-test/target/surefire-reports.tar.gz'
}
}
}
}
}