-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
37 lines (33 loc) · 915 Bytes
/
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
pipeline {
agent any
tools{
go 'go1.20'
}
environment {
GO114MODULE = 'on'
CGO_ENABLED = 0
}
stages{
stage('Build') {
steps {
echo 'Installing dependencies'
sh 'go version'
sh 'go mod download'
}
}
}
stages('Test') {
steps {
echo 'Running Test'
sh 'go test ./...'
}
}
post {
always {
emailext body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}",
recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']],
to: "${params.RECIPIENTS}",
subject: "Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}"
}
}
}