-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
executable file
·40 lines (40 loc) · 1003 Bytes
/
Jenkinsfile
File metadata and controls
executable file
·40 lines (40 loc) · 1003 Bytes
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
pipeline {
agent {
label 'master'
}
options {
buildDiscarder(logRotator(numToKeepStr: '10'))
disableConcurrentBuilds()
}
triggers {
/* No polling: build is triggered by webhook */
pollSCM('')
}
stages {
stage('Go Report') {
agent { label 'jenkins-slave-go' }
steps {
script {
def result = sh(script: "goreportcard-cli -v", returnStdout: true).tokenize('\n')
echo result.join("\n")
if ( ! result.grep(~/^Grade: A.*/) ) {
echo "Please enhance code to make it at least 'Grade: A'"
echo "Try correcting format with: gofmt -w -s . "
// error 'GoReportCard Grade is less than A'
currentBuild.result = 'UNSTABLE'
}
}
}
}
stage('Build') {
steps {
dir ('k8s-aws-accelerator-devplugin') {
sh "./build.sh"
}
dir ('k8s-intel-accelerator-devplugin') {
sh "./build.sh"
}
}
}
}
}