From 0c4491a05e99f7b5ba568a3683c0b14414af1627 Mon Sep 17 00:00:00 2001 From: Joris De Winne Date: Thu, 30 Mar 2017 12:39:38 -0700 Subject: [PATCH] Adding support for username and password --- .travis.yml | 2 +- README.md | 2 ++ build.gradle | 2 +- src/main/resources/datical/datical_deploy.bat.ftl | 2 +- src/main/resources/datical/datical_deploy.sh.ftl | 2 +- src/main/resources/datical/datical_forecast.bat.ftl | 2 +- src/main/resources/datical/datical_forecast.sh.ftl | 2 +- src/main/resources/datical/datical_status.bat.ftl | 2 +- src/main/resources/datical/datical_status.sh.ftl | 2 +- src/main/resources/datical/datical_undeploy.bat.ftl | 4 ++-- src/main/resources/datical/datical_undeploy.sh.ftl | 4 ++-- src/main/resources/synthetic.xml | 4 ++++ 12 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 36f2d14..b62564e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ deploy: provider: releases api_key: secure: W8QeU+nMpQPKDfDKSdcGMx09NRn5Ggd6mgIgpZbAp9+BpDKjDKnxlhCRz3lhGsJJB4U6PMwMj0ywyriudmcVZGZMxddGxYYSXPSvw2bCAO0Kgblt+UiHtdDxhEJOv5CpRXNoB51OEoJopOVUFTbahjqqcARZoh0a0xCp48mru1hB3vQe76HgHk1gk7F3hv/3YWJsMCKPFOzo93Nlg5Jnph8uzAV2BMdIaTUwNcCF/tZ9qO6MtJXmHVBGpCrhF6UWoZHBJ2ky4BBVuvS5e/pvToCGbc3/CVPOARZRqeFR5FcpfHsJp29tZ5FVjc0EXlwrKiTkvud1vmvDOL57bo4wdTdwJ8t+vI6HuJt8tICSMba1aY19+47w9o0o3336qXzm9wLB/AyeItXH4lO+wTTFzl9Qsyps5nkJ7d1r799yCDhLwOEeRQmk6dxK42sxuY2KrxEP3di3bDU1udso0PDFp2OOE74y1QKzRiRj909oil5DAkA8Jnnm2MglBHNUEKcIZmXYHeAqZ5cZX6d9gOPMqHX6EITHOt7pvLAMP9asnVwc395Cjp3Ol3nZ4uycL0MmaoPQ7hcgX7uIgHRI9VqPyQ1sqnjlJ9TkSNTzXU+vt9yskgeuRxygaaOom1e0+XbvFjueU7kCx61HcwyhwQmByXgSYD5d4wm1ECeNrJXM95U= - file: build/distributions/xld-datical-plugin-1.4.0.xldp + file: build/distributions/xld-datical-plugin-1.5.0.xldp on: all_branches: true tags: true diff --git a/README.md b/README.md index f7052a5..afeb9e7 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ This plugin (1.x.x+) requires XLD 5.1+ + `home`: Fully qualified location of Datical DB CLI command. (e.g., `C:\DaticalDB\repl\hammer.bat` or `/opt/DaticalDB/hammer`). + `driverLocation`: Absolute Path on Build Server to Database Drivers used by Datical DB. + `zipLocation`: Absolute Path to 7zip.exe (only applicable on Windows). If provided this one will be used, else the prepackaged one will be used. + + `username`: Database username when the project has the 'Specify database credentials at operation run time' option set. + + `password`: Database password when the project has the 'Specify database credentials at operation run time' option set. + `datical.Project` + `targetPath`: Temporary path where the project should be extracted + `envName`: Environment name to be used for forecast and deploy (e.g. XE) diff --git a/build.gradle b/build.gradle index 27fc6dd..54f5b5e 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'maven' -version="1.4.0" +version="1.5.0" processResources.configure { filter ReplaceTokens, tokens: [ diff --git a/src/main/resources/datical/datical_deploy.bat.ftl b/src/main/resources/datical/datical_deploy.bat.ftl index c64f95f..31a72cd 100755 --- a/src/main/resources/datical/datical_deploy.bat.ftl +++ b/src/main/resources/datical/datical_deploy.bat.ftl @@ -10,4 +10,4 @@ --> -${deployed.container.home} -p ${deployed.targetPath} deploy ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}" <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}" +${deployed.container.home} <#if deployed.container.username?has_content>-un ${deployed.container.username} -pw ${deployed.container.password} -p ${deployed.targetPath} deploy ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}" <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}" diff --git a/src/main/resources/datical/datical_deploy.sh.ftl b/src/main/resources/datical/datical_deploy.sh.ftl index c64f95f..31a72cd 100755 --- a/src/main/resources/datical/datical_deploy.sh.ftl +++ b/src/main/resources/datical/datical_deploy.sh.ftl @@ -10,4 +10,4 @@ --> -${deployed.container.home} -p ${deployed.targetPath} deploy ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}" <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}" +${deployed.container.home} <#if deployed.container.username?has_content>-un ${deployed.container.username} -pw ${deployed.container.password} -p ${deployed.targetPath} deploy ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}" <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}" diff --git a/src/main/resources/datical/datical_forecast.bat.ftl b/src/main/resources/datical/datical_forecast.bat.ftl index 194daa7..181d9c1 100755 --- a/src/main/resources/datical/datical_forecast.bat.ftl +++ b/src/main/resources/datical/datical_forecast.bat.ftl @@ -10,4 +10,4 @@ --> -${deployed.container.home} -p ${deployed.targetPath} forecast ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}" <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}" +${deployed.container.home} <#if deployed.container.username?has_content>-un ${deployed.container.username} -pw ${deployed.container.password} -p ${deployed.targetPath} forecast ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}" <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}" diff --git a/src/main/resources/datical/datical_forecast.sh.ftl b/src/main/resources/datical/datical_forecast.sh.ftl index 194daa7..181d9c1 100755 --- a/src/main/resources/datical/datical_forecast.sh.ftl +++ b/src/main/resources/datical/datical_forecast.sh.ftl @@ -10,4 +10,4 @@ --> -${deployed.container.home} -p ${deployed.targetPath} forecast ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}" <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}" +${deployed.container.home} <#if deployed.container.username?has_content>-un ${deployed.container.username} -pw ${deployed.container.password} -p ${deployed.targetPath} forecast ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}" <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}" diff --git a/src/main/resources/datical/datical_status.bat.ftl b/src/main/resources/datical/datical_status.bat.ftl index 2afe1e2..27a22f3 100755 --- a/src/main/resources/datical/datical_status.bat.ftl +++ b/src/main/resources/datical/datical_status.bat.ftl @@ -10,4 +10,4 @@ --> -${deployed.container.home} -p ${deployed.targetPath} statusDetails ${deployed.envName} +${deployed.container.home} <#if deployed.container.username?has_content>-un ${deployed.container.username} -pw ${deployed.container.password} -p ${deployed.targetPath} statusDetails ${deployed.envName} diff --git a/src/main/resources/datical/datical_status.sh.ftl b/src/main/resources/datical/datical_status.sh.ftl index 2afe1e2..27a22f3 100755 --- a/src/main/resources/datical/datical_status.sh.ftl +++ b/src/main/resources/datical/datical_status.sh.ftl @@ -10,4 +10,4 @@ --> -${deployed.container.home} -p ${deployed.targetPath} statusDetails ${deployed.envName} +${deployed.container.home} <#if deployed.container.username?has_content>-un ${deployed.container.username} -pw ${deployed.container.password} -p ${deployed.targetPath} statusDetails ${deployed.envName} diff --git a/src/main/resources/datical/datical_undeploy.bat.ftl b/src/main/resources/datical/datical_undeploy.bat.ftl index 4d27ed5..1335789 100755 --- a/src/main/resources/datical/datical_undeploy.bat.ftl +++ b/src/main/resources/datical/datical_undeploy.bat.ftl @@ -12,8 +12,8 @@ <#if previousDeployed.changeids?size gt 0> <#list previousDeployed.changeids as changeid> - ${previousDeployed.container.home} -p ${previousDeployed.targetPath} rollback ${previousDeployed.envName} changeid:id=${changeid} + ${previousDeployed.container.home} <#if previousDeployed.container.username?has_content>-un ${previousDeployed.container.username} -pw ${previousDeployed.container.password} -p ${previousDeployed.targetPath} rollback ${previousDeployed.envName} changeid:id=${changeid} <#else> -${previousDeployed.container.home} -p ${previousDeployed.targetPath} rollback ${previousDeployed.envName} lastdeploy +${previousDeployed.container.home} <#if previousDeployed.container.username?has_content>-un ${previousDeployed.container.username} -pw ${previousDeployed.container.password} -p ${previousDeployed.targetPath} rollback ${previousDeployed.envName} lastdeploy diff --git a/src/main/resources/datical/datical_undeploy.sh.ftl b/src/main/resources/datical/datical_undeploy.sh.ftl index 28a947d..3e75999 100755 --- a/src/main/resources/datical/datical_undeploy.sh.ftl +++ b/src/main/resources/datical/datical_undeploy.sh.ftl @@ -12,8 +12,8 @@ <#if previousDeployed.changeids?size gt 0> <#list previousDeployed.changeids as changeid> - ${previousDeployed.container.home} -p ${previousDeployed.targetPath} rollback ${previousDeployed.envName} changeid:id=${changeid} + ${previousDeployed.container.home} <#if previousDeployed.container.username?has_content>-un ${previousDeployed.container.username} -pw ${previousDeployed.container.password} -p ${previousDeployed.targetPath} rollback ${previousDeployed.envName} changeid:id=${changeid} <#else> - ${previousDeployed.container.home} -p ${previousDeployed.targetPath} rollback ${previousDeployed.envName} lastdeploy + ${previousDeployed.container.home} <#if previousDeployed.container.username?has_content>-un ${previousDeployed.container.username} -pw ${previousDeployed.container.password} -p ${previousDeployed.targetPath} rollback ${previousDeployed.envName} lastdeploy diff --git a/src/main/resources/synthetic.xml b/src/main/resources/synthetic.xml index becdcd9..6ad7300 100644 --- a/src/main/resources/synthetic.xml +++ b/src/main/resources/synthetic.xml @@ -24,6 +24,10 @@ description="Absolute Path on Build Server to Database Drivers used by Datical DB."/> + +