-
Notifications
You must be signed in to change notification settings - Fork 138
/
Jenkinsfile
107 lines (95 loc) · 2.28 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
pipeline {
agent { label "cloud-trigger" }
parameters {
booleanParam(name: 'usejenkinsrepo', defaultValue: true,
description: 'Prefer the repo url and branch that Jenkins passed e.g. from the Multibranch Github Plugin. Otherwise use the repourl and branch parameter below.')
string(name: 'repourl', defaultValue: '[email protected]:SUSE-Cloud/automation.git', description: 'url to use of a automation.git repository')
string(name: 'branch', defaultValue: 'master', description: 'branch to use of the automation.git')
}
options {
ansiColor('xterm')
}
environment {
PATH = "/home/jenkins/bin:${env.PATH}"
}
stages {
stage('Output environment') {
steps {
sh "env"
}
}
stage('Checkout from Multibranch') {
when { expression { params.usejenkinsrepo } }
steps {
git branch: "${env.BRANCH_NAME}",
url: "${env.GIT_URL}"
}
}
stage('Checkout from parameters') {
when { not { expression { params.usejenkinsrepo } } }
steps {
git branch: "${params.branch}",
url: "${params.repourl}"
}
}
stage('make clean') {
steps {
sh 'make clean'
}
}
stage('Run checks') {
parallel {
stage('make filecheck') {
steps {
sh 'make filecheck'
}
}
stage('make bashate') {
steps {
sh 'make bashate'
}
}
stage('make rounduptest') {
steps {
sh 'make rounduptest'
}
}
stage('make perlcheck') {
steps {
sh 'make perlcheck'
}
}
stage('make rubycheck') {
steps {
sh 'make rubycheck'
}
}
stage('make pythoncheck') {
steps {
sh 'make pythoncheck'
}
}
stage('make flake8') {
steps {
sh 'make flake8'
}
}
stage('make python_unittest') {
steps {
sh 'make python_unittest'
}
}
stage('make jjb_test') {
steps {
sh 'make jjb_test'
}
}
}
}
stage('final make clean') {
steps {
sh 'make clean'
}
}
}
}