-
Notifications
You must be signed in to change notification settings - Fork 22
/
Jenkinsfile
91 lines (86 loc) · 3.34 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
@Library('slack-notification')
import org.gradiant.jenkins.slack.SlackNotifier
pipeline {
agent none
triggers {
cron('@midnight')
}
stages {
stage('Tests') {
parallel {
stage('shell') {
agent {
dockerfile {
filename 'ci/shellcheck.Dockerfile'
}
}
steps {
sh script: './qa-test --shell', label: 'shell scripts lint'
sh script: './qa-test --license', label: 'license header check'
}
post {
always {
// linters results
recordIssues enabledForFailure: true, failOnError: true, sourceCodeEncoding: 'UTF-8',
tool: checkStyle(pattern: '.shellcheck/*.log', reportEncoding: 'UTF-8', name: 'Shell scripts')
script {
new SlackNotifier().notifyResult("shell-team")
}
}
}
}
stage('powershell lint') {
agent {
dockerfile {
filename 'ci/linter.Dockerfile'
additionalBuildArgs "--build-arg VERSION=1.20.0 --build-arg USER_ID=${env.JENKINS_UID}"
args "--read-only --mount type=tmpfs,destination=/tmp"
}
}
steps {
sh script: './qa-test --dsc', label: 'powershell techniques lint'
}
}
stage('typos') {
agent {
dockerfile {
filename 'ci/typos.Dockerfile'
additionalBuildArgs '--build-arg VERSION=1.0'
}
}
steps {
sh script: 'typos', label: 'check typos'
}
post {
always {
script {
new SlackNotifier().notifyResult("shell-team")
}
}
}
}
stage('test') {
agent {
dockerfile {
filename 'ci/cf-promises.Dockerfile'
additionalBuildArgs "--build-arg USER_ID=${env.JENKINS_UID}"
}
}
steps {
sh script: 'make all', label: 'build techniques'
sh script: 'PATH="/opt/rudder/bin:$PATH" make', label: 'check techniques'
sh script: 'make clean', label: 'cleanup'
sh script: 'git clean -fdx', label: 'cleanup'
}
post {
always {
script {
new SlackNotifier().notifyResult("shell-team")
}
}
}
}
}
}
}
}