forked from truenas/webui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile-API-Testing
73 lines (68 loc) · 1.7 KB
/
Jenkinsfile-API-Testing
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
pipeline {
agent none
triggers {
cron('H 23 * * *')
}
environment {
GH_ORG = 'freenas'
GH_REPO = 'webui'
}
stages {
stage('Queued') {
agent {
label 'JenkinsMaster'
}
steps {
echo "Build queued"
}
}
stage('ixbuild') {
agent {
label 'FreeNAS-ISO'
}
post {
success {
archiveArtifacts artifacts: 'artifacts/**', fingerprint: true
junit 'results/**'
stash includes: 'artifacts/iso/*.iso', name: 'iso'
stash includes: 'artifacts/*-Update/**', name: 'update-files'
}
failure {
echo 'Saving failed artifacts...'
archiveArtifacts artifacts: 'artifacts/**', fingerprint: true
}
}
steps {
checkout scm
echo 'Starting iXBuild Framework pipeline'
sh '/ixbuild/jenkins.sh freenas freenas-pipeline'
}
}
stage('API testing') {
agent {
label 'FreeNAS-QA'
}
post {
always {
junit 'tests/results/*.xml'
}
}
steps {
echo 'Starting QA API testing'
unstash 'iso'
sh 'ls /dev/vmm | xargs vm poweroff | true'
sh 'ixautomation --destroy-all-vm'
sh 'rm -rf ${WORKSPACE}/tests/results'
sh 'mkdir -p ${WORKSPACE}/tests/results'
sh 'rm -rf ${WORKSPACE}/tests/iso'
sh 'mkdir -p ${WORKSPACE}/tests/iso'
sh 'mv artifacts/iso/*.iso ${WORKSPACE}/tests/iso/'
sh 'touch ${WORKSPACE}/tests/iso/.keepme'
echo "ISO WORKSPACE: ${WORKSPACE}/tests/iso/"
sleep 30
sh 'ixautomation --run webui-tests --systype freenas'
sh 'ixautomation --destroy-all-vm'
}
}
}
}