mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
devops-edit --pipeline=node/CanaryReleaseStageAndApprovePromote/Jenkinsfile
This commit is contained in:
parent
c290c47229
commit
a533bad6d9
41
Jenkinsfile
vendored
Normal file
41
Jenkinsfile
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/groovy
|
||||||
|
@Library('github.com/fabric8io/fabric8-pipeline-library@v2.2.311')
|
||||||
|
def utils = new io.fabric8.Utils()
|
||||||
|
clientsNode{
|
||||||
|
def envStage = utils.environmentNamespace('staging')
|
||||||
|
def envProd = utils.environmentNamespace('production')
|
||||||
|
def newVersion = ''
|
||||||
|
|
||||||
|
git 'https://github.com/Alfresco/alfresco-ng2-components.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 = 'node'
|
||||||
|
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)
|
||||||
|
|
||||||
|
stage 'Approve'
|
||||||
|
approve{
|
||||||
|
room = null
|
||||||
|
version = canaryVersion
|
||||||
|
console = fabric8Console
|
||||||
|
environment = envStage
|
||||||
|
}
|
||||||
|
|
||||||
|
stage 'Rollout Production'
|
||||||
|
kubernetesApply(file: rc, environment: envProd)
|
||||||
|
|
||||||
|
}
|
11
fabric8.yml
Normal file
11
fabric8.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
buildName: "adf2"
|
||||||
|
links:
|
||||||
|
Git: "https://github.com/Alfresco/alfresco-ng2-components.git"
|
||||||
|
Job: "http://192.168.64.3:31752/job/adf2"
|
||||||
|
Production: "http://10.0.0.114:80/kubernetes/pods?namespace=default-production"
|
||||||
|
Staging: "http://10.0.0.114:80/kubernetes/pods?namespace=default-staging"
|
||||||
|
environments:
|
||||||
|
Staging: "default-staging"
|
||||||
|
Production: "default-production"
|
||||||
|
useLocalFlow: true
|
Loading…
x
Reference in New Issue
Block a user