-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
70 lines (67 loc) · 2.01 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
#!/usr/bin/env groovy
/*
Jenkins plugins added: Bitbucket Plugin, Warnings Plugin,
Static Analysis Utilities,
*/
pipeline {
agent any
options {
buildDiscarder(logRotator(daysToKeepStr: '30'))
}
environment {
PATH = '/Users/mclapp/git/projects/bin/mac:/Users/mclapp/git/projects/bin:/Users/mclapp/.Bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin'
}
stages {
stage('Build') {
steps {
sh 'make clean'
sh 'make app'
}
}
stage('Pylint') {
steps {
sh 'make pylint_jenkins | tee pylint.log'
// if any errors in pylint.log, make exit(1)
sh '! grep -q \'\\[E\' pylint.log'
}
post {
always {
step([$class: 'WarningsPublisher', parserConfigurations: [[
parserName: 'pylint',
pattern: 'pylint.log'
]]])
/* theoretically the following works on Warnings v5.0
recordIssues enabledForFailure: true,
tools: [[tool: [$class: 'PyLint']]]
*/
}
failure {
echo "Pylint errors, failure:"
sh 'grep \'\\[E\' pylint.log'
}
}
}
stage('Test') {
steps {
//sh 'make pylint_errors_jenkins'
sh 'make tests'
}
post {
always {
junit 'pytest_results.xml'
}
}
}
stage('Deploy') {
steps {
sh 'make dmg'
}
post {
success {
sh 'cp dist/Marcam.dmg "/Users/mclapp/Google Drive/Marcam/Marcam Mac Latest.dmg"'
archiveArtifacts 'dist/Marcam.dmg'
}
}
}
}
}