2016-12-16 11:34:37 +01:00
|
|
|
@Library('ocutil') _
|
2016-12-15 17:35:06 +01:00
|
|
|
|
|
|
|
node() {
|
2016-12-09 16:48:52 +01:00
|
|
|
stage("Checkout") {
|
2016-12-07 23:21:17 +01:00
|
|
|
git "https://github.com/omallo/ruby-ex.git"
|
2016-12-09 16:48:52 +01:00
|
|
|
}
|
2016-12-09 16:41:36 +01:00
|
|
|
|
2016-12-16 11:42:14 +01:00
|
|
|
def config = ocutil.parseConfig(readFile("deployment/config.yaml"))
|
2016-12-09 15:55:28 +01:00
|
|
|
|
2016-12-09 16:48:52 +01:00
|
|
|
stage("Build") {
|
2016-12-16 11:49:10 +01:00
|
|
|
ocutil.ocBuild("rubex-dev", "frontend", config.dev.build.frontend)
|
2016-12-05 15:32:22 +01:00
|
|
|
}
|
|
|
|
|
2016-12-09 16:48:52 +01:00
|
|
|
stage("Deploy to DEV") {
|
2016-12-16 11:40:33 +01:00
|
|
|
ocutil.ocTag("rubex-dev", "frontend", "latest", "dev")
|
|
|
|
ocutil.ocDeploy("rubex-dev", "frontend", config.dev.deployment.frontend)
|
2016-12-05 15:32:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
def isPromoteToTest = false
|
2016-12-09 14:33:03 +01:00
|
|
|
stage("Promote to TEST?") {
|
|
|
|
isPromoteToTest = input(message: "Promotion", parameters: [booleanParam(defaultValue: false, name: "Promote to TEST?")])
|
2016-12-05 15:32:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (isPromoteToTest) {
|
2016-12-09 14:33:03 +01:00
|
|
|
stage("Deploy to TEST") {
|
2016-12-16 11:40:33 +01:00
|
|
|
ocutil.ocTag("rubex-dev", "frontend", "dev", "test")
|
|
|
|
ocutil.ocDeploy("rubex-test", "frontend", config.test.deployment.frontend)
|
2016-12-05 15:32:22 +01:00
|
|
|
}
|
2016-12-09 16:48:52 +01:00
|
|
|
}
|
2016-12-05 15:32:22 +01:00
|
|
|
}
|