forked from Fantom-foundation/Sonic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
48 lines (42 loc) · 1.17 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
pipeline {
agent { label 'pr' }
options {
timestamps()
timeout(time: 1, unit: 'HOURS')
disableConcurrentBuilds(abortPrevious: true)
}
stages {
stage('Validate commit') {
steps {
script {
def CHANGE_REPO = sh(script: 'basename -s .git `git config --get remote.origin.url`', returnStdout: true).trim()
build job: '/Utils/Validate-Git-Commit', parameters: [
string(name: 'Repo', value: "${CHANGE_REPO}"),
string(name: 'Branch', value: "${env.CHANGE_BRANCH}"),
string(name: 'Commit', value: "${GIT_COMMIT}")
]
}
}
}
stage('Static analysis') {
steps {
sh 'make lint'
}
}
stage('Build') {
steps {
sh 'make'
}
}
stage('Run tests') {
steps {
sh 'go test ./... --timeout 30m'
}
}
stage('Clean up') {
steps {
sh 'make clean'
}
}
}
}