-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjenkinsfilescripted
77 lines (65 loc) · 1.7 KB
/
jenkinsfilescripted
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
#!/usr/bin/env groovy
node {
//withEnv(ENV_VAR = 'I am environment variable')
//Setting parameters
properties([parameters([string(defaultValue: 'Hello', description: 'How to greet', name: 'Greetings')])])
stage('checkout'){
node {
checkout scm
}
}
stage('Build'){
node {
echo "compiling build number: ${env.BUILD_ID}"
echo "${params.Greetings}"
archiveArtifacts artifacts: '*.md', fingerprint: true
stash includes: '*.md', name: 'wiki'
}
}
/*
stage('Test-native'){
node('master') {
echo "testing on native"
echo "publishing the unit tests"
unstash 'wiki'
}
}
stage('Test-windows'){
node('testagent') {
echo "testing on windows platform"
echo "publishing the unit tests"
}
}
*/
stage ('Test') {
parallel linux: {
node('master'){
checkout scm
try {
unstash 'wiki'
echo "testing linux"
}
finally {
echo "publish junit tests"
}
}
},
windows: {
node('testagent'){
checkout scm
try {
unstash 'wiki'
echo "testing windows"
}
finally {
echo "publish junit tests"
}
}
}
}
stage('Deploy'){
if (currentBuild.result == null || currentBuild.result == 'SUCCESS' ){
echo "deploying artifacts to repository"
}
}
}