forked from jenkins-zh/jenkins-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
66 lines (62 loc) · 1.98 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
library identifier: 'jenkins_zh@', retriever: modernSCM([$class: 'GitSCMSource', credentialsId: '', remote: 'https://github.com/LinuxSuRen/shared-library', traits: [[$class: 'jenkins.plugins.git.traits.BranchDiscoveryTrait']]])
pipeline {
agent {
label 'golang-1.12'
}
stages {
stage('Init') {
steps {
script {
entry.container_x('golang', 'go version'){
sh label: 'make init', script: 'make init'
}
}
}
}
stage('Build') {
parallel {
stage('MacOS') {
steps {
script {
entry.container_x('golang', 'go version'){
sh label: 'make darwin', script: 'make darwin'
}
}
}
}
stage('Linux') {
steps {
script {
entry.container_x('golang', 'go version'){
sh label: 'make linux', script: 'make linux'
}
}
}
}
stage('Windows') {
steps {
script {
entry.container_x('golang', 'go version'){
sh label: 'make win', script: 'make win'
}
}
}
}
}
}
stage('Test') {
steps {
script {
entry.container_x('golang', 'go version'){
sh label: 'go test', script: 'make test'
}
}
}
}
}
post {
always {
junit allowEmptyResults: true, testResults: "*/**/*.xml"
}
}
}