Commit 826226e 1 parent 8732efc commit 826226e Copy full SHA for 826226e
File tree 1 file changed +48
-0
lines changed
1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ pipeline {
2
+ agent { label ' pr' }
3
+
4
+ options {
5
+ timestamps()
6
+ timeout(time : 1 , unit : ' HOURS' )
7
+ disableConcurrentBuilds(abortPrevious : true )
8
+ }
9
+
10
+ stages {
11
+ stage(' Validate commit' ) {
12
+ steps {
13
+ script {
14
+ def CHANGE_REPO = sh(script : ' basename -s .git `git config --get remote.origin.url`' , returnStdout : true ). trim()
15
+ build job : ' /Utils/Validate-Git-Commit' , parameters : [
16
+ string(name : ' Repo' , value : " ${ CHANGE_REPO} " ),
17
+ string(name : ' Branch' , value : " ${ env.CHANGE_BRANCH} " ),
18
+ string(name : ' Commit' , value : " ${ GIT_COMMIT} " )
19
+ ]
20
+ }
21
+ }
22
+ }
23
+
24
+ stage(' Static analysis' ) {
25
+ steps {
26
+ sh ' make lint'
27
+ }
28
+ }
29
+
30
+ stage(' Build' ) {
31
+ steps {
32
+ sh ' make'
33
+ }
34
+ }
35
+
36
+ stage(' Run tests' ) {
37
+ steps {
38
+ sh ' go test ./... --timeout 30m'
39
+ }
40
+ }
41
+
42
+ stage(' Clean up' ) {
43
+ steps {
44
+ sh ' make clean'
45
+ }
46
+ }
47
+ }
48
+ }
You can’t perform that action at this time.
0 commit comments