Skip to content

Commit 91d1859

Browse files
authored
Reintroduce jenkinsfile configuration for ci/ct (#402)
* Reintroduce jenkinsfile configuration for ci/ct * Remove make lint from CI * Add tools block for specifying go version
1 parent 8732efc commit 91d1859

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

Jenkinsfile

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
pipeline {
2+
agent { label 'pr' }
3+
4+
options {
5+
timestamps()
6+
timeout(time: 1, unit: 'HOURS')
7+
disableConcurrentBuilds(abortPrevious: true)
8+
}
9+
10+
tools { go '1.21' }
11+
12+
stages {
13+
stage('Validate commit') {
14+
steps {
15+
script {
16+
def CHANGE_REPO = sh(script: 'basename -s .git `git config --get remote.origin.url`', returnStdout: true).trim()
17+
build job: '/Utils/Validate-Git-Commit', parameters: [
18+
string(name: 'Repo', value: "${CHANGE_REPO}"),
19+
string(name: 'Branch', value: "${env.CHANGE_BRANCH}"),
20+
string(name: 'Commit', value: "${GIT_COMMIT}")
21+
]
22+
}
23+
}
24+
}
25+
26+
stage('Build') {
27+
steps {
28+
sh 'make'
29+
}
30+
}
31+
32+
stage('Run tests') {
33+
steps {
34+
sh 'go test ./... --timeout 30m'
35+
}
36+
}
37+
38+
stage('Clean up') {
39+
steps {
40+
sh 'make clean'
41+
}
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)