-
Notifications
You must be signed in to change notification settings - Fork 0
/
NightlyPipeline-sample.groovy
59 lines (56 loc) · 1.66 KB
/
NightlyPipeline-sample.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
pipeline {
agent any
stages {
stage('Start') {
steps {
notify 'PENDING'
}
}
stage('Checkout') {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']],
extensions: [[$class: 'WipeWorkspace']],
userRemoteConfigs: [[credentialsId: 'dd067490-e408-45cb-b911-d825906a05ee',
url: 'https://github.com/flowlogix/flowlogix']]])
}
}
stage('Maven Info') {
steps {
sh 'mvn -V -N -B -C help:all-profiles'
}
}
stage('Maven Verify - Regular + Stress Tests') {
steps {
withMaven {
sh """#!/bin/bash -pl
sdk current
export MAVEN_OPTS="\$MAVEN_OPTS $JAVA_TOOL_OPTIONS"
unset JAVA_TOOL_OPTIONS
mvn -B -C verify -DforkCount=0 -Dsurefire.useSystemClassLoader=false \
-Dmaven.install.skip=true -Pall-tests -fae
"""
}
}
}
}
post {
success {
notify 'SUCCESS'
}
failure {
notify 'FAILURE'
}
unstable {
notify 'FAILURE'
}
always {
archiveArtifacts artifacts: '**/payara5/**/server.log*'
}
}
}
void notify(String newStatus) {
githubNotify description: 'Nightly Build',
credentialsId: 'dd067490-e408-45cb-b911-d825906a05ee', account: 'flowlogix',
repo: 'flowlogix', sha: 'master',
context: 'CI/Nightly', status: newStatus
}