-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
67 lines (59 loc) · 2.09 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
pipeline {
agent any
environment {
PATH = "/opt/gradle/gradle-4.7/bin:/opt/vagrant:$PATH"
RESOURCE_SERVER = '192.168.56.100'
RESOURCE_SERVER_ROOT = '/home/user/resources'
PHANTOMJS_PATH = '/home/patrick/Downloads/phantomjs-2.1.1-linux-x86_64/bin/phantomjs'
}
stages {
stage('Preparation') {
steps {
git(url: 'https://github.com/ediordna/parcelSizeComponent', branch: 'master')
}
}
stage('Build') {
steps {
sh 'gradle clean unitTest fatJar' //gradle conducts build.gradle with the tasks unitTest and fatJar
withCredentials(bindings: [sshUserPrivateKey(credentialsId: 'ressourceServerCredentials', \
keyFileVariable: 'RESOURCE_SERVER_KEY', \
usernameVariable: 'RESOURCE_SERVER_USER')]) {
sh './scripts/build_docker.sh'
}
}
}
stage('Integration') {
steps {
withCredentials(bindings: [sshUserPrivateKey(credentialsId: 'ressourceServerCredentials', \
keyFileVariable: 'RESOURCE_SERVER_KEY', \
usernameVariable: 'RESOURCE_SERVER_USER')]) {
sh './scripts/setup_test_env.sh' //behind this script is a second one to build the test containers
}
sh 'gradle integrationTest' //gradle conducts build.gradle with the task integrationTest
}
}
stage('UAT') {
steps {
sh 'gradle UATest'
}
}
stage('Performance') {
steps {
sh 'gradle gatlingRun'
}
}
stage('Manual testing') {
steps {
input(message: 'Release ready?')
}
}
}
post {
always {
sh './scripts/cleanup_test_env.sh'
sh './scripts/cleanup_workspace.sh'
junit('**/build/test-results/unitTest/*.xml,**/build/test-results/integrationTest/*.xml')
gatlingArchive() //creates nice charts
}
}
}