Skip to content

Commit

Permalink
Adding support for username and password
Browse files Browse the repository at this point in the history
  • Loading branch information
jdewinne committed Mar 30, 2017
1 parent 754ca76 commit 0c4491a
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/datical/datical_deploy.bat.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
-->

${deployed.container.home} -p ${deployed.targetPath} deploy ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}"</#if> <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}"</#if>
${deployed.container.home} <#if deployed.container.username?has_content>-un ${deployed.container.username} -pw ${deployed.container.password}</#if> -p ${deployed.targetPath} deploy ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}"</#if> <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}"</#if>
2 changes: 1 addition & 1 deletion src/main/resources/datical/datical_deploy.sh.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
-->

${deployed.container.home} -p ${deployed.targetPath} deploy ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}"</#if> <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}"</#if>
${deployed.container.home} <#if deployed.container.username?has_content>-un ${deployed.container.username} -pw ${deployed.container.password}</#if> -p ${deployed.targetPath} deploy ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}"</#if> <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}"</#if>
2 changes: 1 addition & 1 deletion src/main/resources/datical/datical_forecast.bat.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
-->

${deployed.container.home} -p ${deployed.targetPath} forecast ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}"</#if> <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}"</#if>
${deployed.container.home} <#if deployed.container.username?has_content>-un ${deployed.container.username} -pw ${deployed.container.password}</#if> -p ${deployed.targetPath} forecast ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}"</#if> <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}"</#if>
2 changes: 1 addition & 1 deletion src/main/resources/datical/datical_forecast.sh.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
-->

${deployed.container.home} -p ${deployed.targetPath} forecast ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}"</#if> <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}"</#if>
${deployed.container.home} <#if deployed.container.username?has_content>-un ${deployed.container.username} -pw ${deployed.container.password}</#if> -p ${deployed.targetPath} forecast ${deployed.envName} <#if deployed.labels?has_content>--labels="${deployed.labels}"</#if> <#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}"</#if>
2 changes: 1 addition & 1 deletion src/main/resources/datical/datical_status.bat.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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}</#if> -p ${deployed.targetPath} statusDetails ${deployed.envName}
2 changes: 1 addition & 1 deletion src/main/resources/datical/datical_status.sh.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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}</#if> -p ${deployed.targetPath} statusDetails ${deployed.envName}
4 changes: 2 additions & 2 deletions src/main/resources/datical/datical_undeploy.bat.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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}</#if> -p ${previousDeployed.targetPath} rollback ${previousDeployed.envName} changeid:id=${changeid}
</#list>
<#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}</#if> -p ${previousDeployed.targetPath} rollback ${previousDeployed.envName} lastdeploy
</#if>
4 changes: 2 additions & 2 deletions src/main/resources/datical/datical_undeploy.sh.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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}</#if> -p ${previousDeployed.targetPath} rollback ${previousDeployed.envName} changeid:id=${changeid}
</#list>
<#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}</#if> -p ${previousDeployed.targetPath} rollback ${previousDeployed.envName} lastdeploy
</#if>
4 changes: 4 additions & 0 deletions src/main/resources/synthetic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
description="Absolute Path on Build Server to Database Drivers used by Datical DB."/>
<property name="zipLocation" label="7 zip location" required="false"
description="Absolute Path to 7zip.exe (only applicable on Windows). If provided this one will be used, else the prepackaged one will be used."/>
<property name="username" label="Username" required="false" category="Credentials"
description="Database username when the project has the 'Specify database credentials at operation run time' option set." />
<property name="password" label="Password" required="false" category="Credentials" password="true"
description="Database password when the project has the 'Specify database credentials at operation run time' option set." />
<method name="check"
delegate="shellScript"
host="${thisCi.host}"
Expand Down

0 comments on commit 0c4491a

Please sign in to comment.