forked from truenas/middleware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
79 lines (74 loc) · 1.85 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
67
68
69
70
71
72
73
74
75
76
77
78
79
pipeline {
agent none
environment {
GH_ORG = 'freenas'
GH_REPO = 'freenas'
}
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('PR Staging') {
agent {
label 'FreeNAS-Update-Stage'
}
steps {
echo 'Staging the PR update'
sh 'rm -rf ${WORKSPACE}/artifacts/*Update'
unstash 'update-files'
sh '/root/freenas-update/release-pr-workspace.sh'
}
}
stage('API testing') {
agent {
label 'FreeNAS-QA'
}
post {
always {
junit 'tests/results/*.xml'
}
}
steps {
echo 'Starting QA API testing'
unstash 'iso'
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 api-tests --systype freenas'
}
}
}
}