
1 changed files with 7 additions and 20 deletions
@ -1,30 +1,17 @@ |
|||||
podTemplate(containers: [ |
podTemplate(containers: [ |
||||
containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', ttyEnabled: true, command: 'cat'), |
containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', ttyEnabled: true, command: 'cat'), |
||||
containerTemplate(name: 'golang', image: 'golang:1.8.0', ttyEnabled: true, command: 'cat') |
containerTemplate(name: 'golang', image: 'golang:1.8.0', ttyEnabled: true, command: 'cat'), |
||||
|
containerTemplate(name: 'kaniko', image: 'gcr.io/kaniko-project/executor:latest', imagePullPolicy: 'Always', command: '/busybox/cat', ttyEnabled: true) |
||||
]) { |
]) { |
||||
|
|
||||
node(POD_LABEL) { |
node(POD_LABEL) { |
||||
stage('Get a Maven project') { |
stage('Build') { |
||||
git 'https://github.com/jenkinsci/kubernetes-plugin.git' |
git 'https://gyulai.cloud/git/bme/covidok-backend.git' |
||||
container('maven') { |
container('kaniko') { |
||||
stage('Build a Maven project') { |
stage('Build and publish dev Docker image') { |
||||
sh 'mvn -B clean install' |
sh '/kaniko/executor -f covidok-backend/CoviDok/Dockerfile -c `pwd` --destination=docker.local/bme/covidok' |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
stage('Get a Golang project') { |
|
||||
git url: 'https://github.com/hashicorp/terraform.git' |
|
||||
container('golang') { |
|
||||
stage('Build a Go project') { |
|
||||
sh """ |
|
||||
mkdir -p /go/src/github.com/hashicorp |
|
||||
ln -s `pwd` /go/src/github.com/hashicorp/terraform |
|
||||
cd /go/src/github.com/hashicorp/terraform && make core-dev |
|
||||
""" |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
} |
} |
||||
} |
} |
Loading…
Reference in new issue