-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
75 lines (64 loc) · 1.32 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
pipeline {
agent {
label 'test-node-a'
}
triggers {
pollSCM('H/2 * * * *')
}
stages {
stage('Run a docker') {
steps {
sh '''uptime'''
}
}
stage('Mster in environment') {
when {
branch 'master'
}
steps {
sh '''free -m'''
}
}
stage('Test-t in environment') {
when {
branch 'test-t'
}
steps {
sh '''echo `pwd;ifconfig|grep -Po '(?<=inet )[0-9.]+(?= netmask)' |grep -v '127.0.0.1'`;python setup.py install; ls -l'''
}
}
stage('echo a message') {
steps {
sh 'echo 567890xxxx >> /tmp/t.log'
}
}
stage('Parallel............') {
parallel {
stage('Parallel a stage first') {
steps {
echo 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx11--------'
}
}
stage('Paralle a stage second') {
steps {
echo 'yyyyyyyyyyyyyyyyyyyyyyyyy'
}
}
stage('Another...') {
stages {
stage('another stage') {
steps {
echo 'zzzzzzzzzzzzzzzzzz'
}
}
}
}
}
}
}
post {
failure {
emailext(subject: '[Failed to build]',body: '$DEFAULT_CONTENT',to: '[email protected]')
}
}
}