forked from Byte-Cats/microman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
34 lines (34 loc) · 849 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
pipeline {
// install golang 1.18 on Jenkins node
agent any
tools {
go 'go1.18'
}
environment {
GO114MODULE = 'on'
CGO_ENABLED = 0
GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}"
}
stages {
stage("unit-test") {
steps {
echo 'UNIT TEST EXECUTION STARTED'
sh 'make unit-tests'
}
}
stage("functional-test") {
steps {
echo 'FUNCTIONAL TEST EXECUTION STARTED'
sh 'make functional-tests'
}
}
stage("build") {
steps {
echo 'BUILD EXECUTION STARTED'
sh 'go version'
sh 'go get ./..'
sh 'docker build . -t microman/micro'
}
}
}
}