-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathJenkinsfile
29 lines (28 loc) · 854 Bytes
/
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
pipeline {
agent any
options {
buildDiscarder(logRotator(daysToKeepStr: '10', numToKeepStr: '10'))
timeout(time: 12, unit: 'HOURS')
timestamps()
}
stages {
stage('Requirements') {
steps {
// this step is required to make sure the script
// can be executed directly in a shell
sh('chmod +x ./algorithm.sh')
}
}
stage('Build') {
steps {
// the algorithm script creates a file named report.txt
sh('./algorithm.sh')
// this step archives the report
archiveArtifacts allowEmptyArchive: true,
artifacts: '*.txt',
fingerprint: true,
onlyIfSuccessful: true
}
}
}
}