diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..ebe1a79 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,57 @@ +#!/usr/bin/groovy +@Library('github.com/fabric8io/fabric8-pipeline-library@master') +def canaryVersion = "1.0.${env.BUILD_NUMBER}" +def utils = new io.fabric8.Utils() +def stashName = "buildpod.${env.JOB_NAME}.${env.BUILD_NUMBER}".replace('-', '_').replace('/', '_') +def envStage = utils.environmentNamespace('stage') +def envProd = utils.environmentNamespace('run') + +mavenNode { + checkout scm + if (utils.isCI()){ + + mavenCI{} + + } else if (utils.isCD()){ + echo 'NOTE: running pipelines for the first time will take longer as build and base docker images are pulled onto the node' + container(name: 'maven') { + + stage('Build Release'){ + mavenCanaryRelease { + version = canaryVersion + } + //stash deployment manifests + stash includes: '**/*.yml', name: stashName + } + + stage('Rollout to Stage'){ + apply{ + environment = envStage + } + } + } + } +} + +if (utils.isCD()){ + node { + stage('Approve'){ + approve { + room = null + version = canaryVersion + environment = 'Stage' + } + } + } + + clientsNode{ + container(name: 'clients') { + stage('Rollout to Run'){ + unstash stashName + apply{ + environment = envProd + } + } + } + } +} \ No newline at end of file diff --git a/jbdevstudio-teams/pullonly.team b/jbdevstudio-teams/pullonly.team index 29e1e9c..ed12e68 100644 --- a/jbdevstudio-teams/pullonly.team +++ b/jbdevstudio-teams/pullonly.team @@ -28,6 +28,7 @@ ljelinkova maxandersen michellemurray mickaelistria +mishaone mlabuda mmalina mmusaji @@ -43,6 +44,7 @@ robstryker sbunciak scabanovich snjeza +supriya-bharadwaj vpakan vrubezhny xcoulon