Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* This pipeline describes a multi container job, running Maven and Golang builds
podTemplate(yaml: """
apiVersion: v1
kind: Pod
- name: maven
image: maven:3.3.9-jdk-8-alpine
command: ['cat']
tty: true
- name: golang
image: golang:1.8.0
command: ['cat']
tty: true
) {
node(POD_LABEL) {
stage('Build a Maven project') {
git ''
container('maven') {
sh 'mvn -B clean package'
stage('Build a Golang project') {
git url: ''
container('golang') {
sh """
mkdir -p /go/src/
ln -s `pwd` /go/src/
cd /go/src/ && make build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment