未验证 提交 7c2053a4 编写于 作者: LinuxSuRen's avatar LinuxSuRen 提交者: GitHub

Merge pull request #125 from LinuxSuRen/use-shared-library

Use shared-library to super container dsl
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'
......@@ -8,22 +10,28 @@ pipeline {
parallel {
stage('MacOS') {
steps {
container('golang') {
sh label: 'make darwin', script: 'make darwin'
script {
entry.container_x('golang', 'go version'){
sh label: 'make darwin', script: 'make darwin'
}
}
}
}
stage('Linux') {
steps {
container('golang') {
sh label: 'make linux', script: 'make linux'
script {
entry.container_x('golang', 'go version'){
sh label: 'make linux', script: 'make linux'
}
}
}
}
stage('Windows') {
steps {
container('golang') {
sh label: 'make win', script: 'make win'
script {
entry.container_x('golang', 'go version'){
sh label: 'make win', script: 'make win'
}
}
}
}
......@@ -32,8 +40,10 @@ pipeline {
stage('Test') {
steps {
container('golang') {
sh label: 'go test', script: 'make test'
script {
entry.container_x('golang', 'go version'){
sh label: 'go test', script: 'make test'
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册