-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
29 lines (23 loc) · 874 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
#!/usr/bin/groovy
@Library('github.com/fabric8io/[email protected]')
def utils = new io.fabric8.Utils()
clientsNode{
def envStage = utils.environmentNamespace('staging')
def newVersion = ''
git 'https://github.com/Ryan-VG/accounts-holdings.git'
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 node:5.3-onbuild'
}
newVersion = performCanaryRelease {}
def rc = getKubernetesJson {
port = 8080
label = 'nodejs'
icon = 'https://cdn.rawgit.com/fabric8io/fabric8/dc05040/website/src/images/logos/nodejs.svg'
version = newVersion
imageName = clusterImageName
}
stage 'Rollout Staging'
kubernetesApply(file: rc, environment: envStage)
}