-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
33 lines (25 loc) · 888 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
#!/usr/bin/groovy
@Library('github.com/fabric8io/fabric8-pipeline-library@master')
def utils = new io.fabric8.Utils()
node {
def envStage = utils.environmentNamespace('staging')
def newVersion = ''
clientsNode{
git 'https://github.com/ntfrnzn/bakingdish'
stage 'Canary release'
echo 'NOTE: running pipelines for the first time will take longer as build and base docker images are pulled onto the node'
if (!fileExists ('Dockerfile')) {
writeFile file: 'Dockerfile', text: 'FROM golang:onbuild'
}
newVersion = performCanaryRelease {}
}
def rc = getKubernetesJson {
port = 8080
label = 'golang'
icon = 'https://cdn.rawgit.com/fabric8io/fabric8/dc05040/website/src/images/logos/gopher.png'
version = newVersion
imageName = clusterImageName
}
stage 'Rollout Staging'
kubernetesApply(file: rc, environment: envStage)
}