-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
92 lines (58 loc) · 2.12 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
80
81
82
83
84
85
86
87
88
89
90
91
92
#!groovy
properties([
[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '1', daysToKeepStr: '', numToKeepStr: '']]
])
node("nuc") {
wrap([$class: 'TimestamperBuildWrapper']) {
def startTime = System.currentTimeMillis()
def wsDir = getWorkspace(startTime)
wsDir = 'xam'
ws (wsDir) {
stage 'Workspace'
echo "Using " + wsDir
pwd()
echo 'Cleaning...'
deleteDir()
stage 'Source'
echo 'Retrieving source...'
// checkout scm
sh ''' echo "checkout scm" '''
stage 'Setup'
echo 'Setting environment...'
sh '''echo hei'''
sh '''#!bash
echo hei igjen fra bash
'''
sh '''#!python
print("heisann sveisann påan")
'''
stage 'Dependencies'
echo 'Retrieving dependencies...'
bat ''' if not exist deps mkdir deps '''
bat ''' echo some-dependency-content-perhaps-binary-somedep-1220 > deps\\somedep-1.22.0.dep.txt '''
bat ''' echo some-dependency-content-perhaps-binary-otherdep-421132 > deps\\otherdep-4.2.113-2.dep.txt '''
bat ''' time /t && ping 127.0.0.1 -n 6 -w 10 2>nul >nul && time /t '''
stage 'Fingerperinting'
echo 'Fingerprinting dependencies...'
//step([$class: 'ArtifactArchiver', artifacts: 'deps/**/*', fingerprint: true])
step([$class: 'Fingerprinter', targets: 'deps/**/*'])
stage 'Build'
echo 'Building...'
// timeout(time: 30, unit: 'SECONDS') {
// bat ''' for /L %%i in (1, 1, 4) do ( echo "Compile file %%i" && ping 127.0.0.1 -n %%i -w 10 ) '''
// }
bat ''' echo "Compile file 1" && ping 127.0.0.1 -n 1 -w 10 '''
stage 'Unit tests'
echo 'Performing unit tests...'
stage 'Pack'
echo 'Packaging...'
stage 'Extended tests'
echo 'Performing extended testing...'
stage 'Artifact'
echo 'Storing build artifacts...'
}
}
}
def getWorkspace(time) {
pwd().replace("%2F", "_") + '-' + time
}