-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
67 lines (60 loc) · 1.95 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
library(identifier: '[email protected]', changelog: false)
library(identifier: '[email protected]', changelog: false)
// Get python-utils library from current commit so it can test itself in this Jenkinsfile
library "python-utils@${params.JENKINS_COMMIT}"
devToolsProject.run(
defaultBranch: 'main',
test: { data ->
parallel(
groovydoc: { data['docs'] = groovydoc.generate() },
groovylint: { groovylint.check('./Jenkinsfile,./*.gradle,**/*.groovy') },
junit: {
try {
sh './gradlew test --warning-mode fail'
} finally {
junit 'build/test-results/**/*.xml'
}
},
)
},
publish: { data ->
jupiter.publishDocs("${data['docs']}/", 'Ableton/python-pipeline-utils')
},
)
eventRecorder.timedStage('Integration Test') {
Map stages = [:]
['linux', 'mac', 'win'].each { osType ->
stages[osType.capitalize()] = {
// TODO: Fix this once the 12.5 (and newer) Macs are working
String nodeLabel = "generic-${osType}"
if (osType == 'mac') {
nodeLabel = 'generic-mac-xcode12.2'
}
eventRecorder.timedNode(nodeLabel) {
echo 'Test VirtualEnv.create'
Object venv = virtualenv.create('python3')
String venvVersion = venv.run(returnStdout: true, script: 'python --version')
assert venvVersion.startsWith('Python 3')
if (isUnix()) {
echo 'Test VirtualEnv.createWithPyenv'
Object pyvenv = pyenv.createVirtualEnv('3.10.3')
String pyvenvVersion =
pyvenv.run(returnStdout: true, script: 'python --version')
echo pyvenvVersion
assert pyvenvVersion.trim() == 'Python 3.10.3'
}
}
}
}
parallel(stages)
}
if (runTheBuilds.isPushTo(['main'])) {
devToolsProject.run(
defaultBranch: 'main',
deploy: { data ->
String versionNumber = readFile('VERSION').trim()
version.tag(versionNumber)
version.forwardMinorBranch(versionNumber)
},
)
}