forked from dapr/dapr
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Jenkinsfile
51 lines (46 loc) · 1.03 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
49
50
51
@Library('jenkins.shared.library') _
pipeline {
agent {
label 'ubuntu_docker_label'
}
tools {
go "Go 1.16"
}
options {
checkoutToSubdirectory('src/github.com/infobloxopen/dapr')
}
environment {
GOPATH = "$WORKSPACE"
DIRECTORY = "src/github.com/infobloxopen/dapr"
DOCKER_IMAGE = "infoblox/dapr"
}
stages {
stage("Setup") {
steps {
prepareBuild()
}
}
stage("Test") {
steps {
sh "cd $DIRECTORY && make test"
}
}
stage("build-and-archive-binaries-linux-amd64"){
steps {
sh "cd $DIRECTORY && make tidy && make release GOOS='linux' GOARCH='amd64' "
}
}
stage("Build-And-Push-Docker") {
steps {
withDockerRegistry([credentialsId: "dockerhub-bloxcicd", url: ""]) {
sh "cd $DIRECTORY && make docker-push GOOS='linux' GOARCH='amd64' "
}
}
}
}
post {
cleanup {
sh "cd $DIRECTORY && make clean GOOS='linux' GOARCH='amd64'"
}
}
}