-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
JP-work
committed
Jul 31, 2017
1 parent
9c25852
commit 54f6ce9
Showing
21 changed files
with
389 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,33 @@ | ||
import org.apache.tools.ant.filters.ReplaceTokens | ||
|
||
plugins { | ||
id "com.github.hierynomus.license" version "0.13.0" | ||
id "com.xebialabs.xldp" version "1.0.5" | ||
id "com.xebialabs.xl.docker" version "1.0.0" | ||
} | ||
|
||
defaultTasks 'build' | ||
|
||
apply plugin: 'java' | ||
apply plugin: 'idea' | ||
apply plugin: 'eclipse' | ||
apply plugin: 'maven' | ||
version='1.0.0-beta' | ||
|
||
license { | ||
header rootProject.file('License.md') | ||
strictCheck false | ||
excludes(["**/*.json"]) | ||
ext.year = Calendar.getInstance().get(Calendar.YEAR) | ||
ext.name = 'XEBIALABS' | ||
|
||
xlDocker { | ||
compileImage = 'xebialabs/xld_dev_compile' | ||
compileVersion = 'v7.0.0.1' | ||
runImage = 'xebialabs/xld_dev_run' | ||
runVersion = 'v7.0.0.1' | ||
runPortMapping = '14516:4516' | ||
} | ||
|
||
|
||
sourceCompatibility = 1.7 | ||
targetCompatibility = 1.7 | ||
version = '1.0.6' | ||
|
||
|
||
processResources.configure { | ||
filter ReplaceTokens, tokens: [ | ||
'project.version': version.toString(), | ||
'project.name' : rootProject.name | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Mon Jul 31 15:18:11 MDT 2017 | ||
#Tue May 30 06:52:12 MDT 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
rootProject.name='xld-duckcreek-plugin' | ||
rootProject.name = 'aig-xld-duckcreek-plugin' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import json, glob | ||
|
||
# build up variable with glob path | ||
path1 = str(deployed.file.path) | ||
path = glob.glob(path1 + "/*.json") | ||
|
||
# Locate and store manifest.json information | ||
for f_name in path: | ||
with open(f_name, 'r') as data_file: | ||
data = json.load(data_file) | ||
|
||
# Generate deployment for each appserver item | ||
for appFile in data["appServerFiles"]: | ||
if appFile.get('file'): | ||
context.addStep(steps.powershell( | ||
description="Deploying Duck Creek app source: %s " % appFile["source"] , | ||
script="duckcreek/deploy.ps1", | ||
order=60, | ||
powershell_context={'deployedApplication': deployedApplication, 'source': appFile["source"], 'target': appFile["target"], 'copytype': appFile["copytype"], 'file':appFile["file"]})) | ||
else: | ||
context.addStep(steps.powershell( | ||
description="Deploying Duck Creek app source: %s " % appFile["source"] , | ||
script="duckcreek/deploy.ps1", | ||
order=60, | ||
powershell_context={'deployedApplication': deployedApplication, 'source': appFile["source"], 'target': appFile["target"], 'copytype': appFile["copytype"]})) | ||
|
||
# Generate deployment for each webserver item | ||
for webFile in data["webServerFiles"]: | ||
if webFile.get('file'): | ||
context.addStep(steps.powershell( | ||
description="Deploying Duck Creek app source: %s " % webFile["source"] , | ||
script="duckcreek/deploy.ps1", | ||
order=60, | ||
powershell_context={'deployedApplication': deployedApplication, 'source': webFile["source"], 'target': webFile["target"], 'copytype': webFile["copytype"], 'file':webFile["file"]})) | ||
else: | ||
context.addStep(steps.powershell( | ||
description="Deploying Duck Creek app source: %s " % webFile["source"] , | ||
script="duckcreek/deploy.ps1", | ||
order=60, | ||
powershell_context={'deployedApplication': deployedApplication, 'source': webFile["source"], 'target': webFile["target"], 'copytype': webFile["copytype"]})) | ||
|
||
# Generate IIS restart on successful deployment | ||
if data["restartIIS"] == "True": | ||
context.addStep(steps.powershell( | ||
description="Issue IIS restart command", | ||
script="duckcreek/iis_restart.ps1", | ||
order=80, | ||
powershell_context={'deployedApplication': deployedApplication})) | ||
|
||
# Generate IIS restart on successful deployment | ||
if data["updateDBserver"] == "True": | ||
context.addStep(steps.powershell( | ||
description="Issue database restart command", | ||
script="duckcreek/db_restart.ps1", | ||
order=90, | ||
powershell_context={'deployedApplication': deployedApplication})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Write-Host "Database restart command goes here." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
$source1 = "$($deployed.file)\$($source)" | ||
$dest = "C:\\Windows\Temp\$($target)\" | ||
|
||
robocopy $source1 $dest /S | ||
$source1 = "$($deployed.file)\$($source)" | ||
$dest = "C:\\Windows\Temp\$($target)" | ||
|
||
Write-Host "Source val: $source" | ||
Write-Host "File val: $file" | ||
Write-Host "Deployed file source: $source1" | ||
Write-Host "Deployed file destination: $dest" | ||
Write-Host "COPY TYPE: $copytype" | ||
|
||
# Add check to return proper exit code, for some reason ROBOCOPY returns 1 on success o.0 | ||
function ROBO_exit_check ($val) | ||
{ | ||
Write-Host "val: $val" | ||
if ($val -eq 0) | ||
{ | ||
write-host "Robocopy exit code 0: No errors occurred, and no copying was done. The source and destination directory trees are completely synchronized." | ||
} | ||
elseif ($val -eq 1) | ||
{ | ||
write-host "Robocopy exit code 1: One or more files were copied successfully (that is, new files have arrived)." | ||
exit 0 | ||
} | ||
else | ||
{ | ||
Write-Host "Robocopy error code $lastexitcode" | ||
} | ||
} | ||
|
||
if ($copytype -eq "full") | ||
{ | ||
robocopy $source1 $dest /S | ||
ROBO_exit_check($lastexitcode) | ||
} | ||
elseif ($copytype -eq "only-files") | ||
{ | ||
if ($file -eq "") | ||
{ | ||
robocopy $source1 $dest /S | ||
ROBO_exit_check($lastexitcode) | ||
} | ||
else | ||
{ | ||
robocopy $source1 $dest $file /S | ||
ROBO_exit_check($lastexitcode) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
echo "destroy script NOOP notification" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invoke-command -scriptblock {iisreset} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
echo "modify script NOOP notification" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS | ||
FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS. | ||
--> | ||
<synthetic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.xebialabs.com/deployit/synthetic" xsi:schemaLocation="http://www.xebialabs.com/deployit/synthetic synthetic.xsd"> | ||
|
||
<type type="duckcreek.ExecutedDeploymentPackage" deployable-type="duckcreek.Package" extends="udm.BaseDeployedArtifact" container-type="iis.Server"> | ||
<generate-deployable type="duckcreek.Package" extends="udm.BaseDeployableFolderArtifact" copy-default-values="true"/> | ||
</type> | ||
|
||
</synthetic> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS | ||
FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS. | ||
--> | ||
<rules xmlns="http://www.xebialabs.com/xl-deploy/xl-rules"> | ||
|
||
<rule name="duckcreek.ExecutedDeploymentPackage_CREATE" scope="deployed"> | ||
<conditions> | ||
<type>duckcreek.ExecutedDeploymentPackage</type> | ||
<operation>CREATE</operation> | ||
</conditions> | ||
<planning-script-path>duckcreek/GenerateDeployPlan.py</planning-script-path> | ||
</rule> | ||
|
||
<rule name="duckcreek.ExecutedDeploymentPackage_MODIFY" scope="deployed"> | ||
<conditions> | ||
<type>duckcreek.ExecutedDeploymentPackage</type> | ||
<operation>MODIFY</operation> | ||
</conditions> | ||
<planning-script-path>duckcreek/modify_deploy.bat.ftl</planning-script-path> | ||
</rule> | ||
|
||
<rule name="duckcreek.ExecutedDeploymentPackage_DESTROY" scope="deployed"> | ||
<conditions> | ||
<type>duckcreek.ExecutedDeploymentPackage</type> | ||
<operation>DESTROY</operation> | ||
</conditions> | ||
<steps> | ||
<os-script> | ||
<script>duckcreek/destroy_deploy.bat.ftl</script> | ||
</os-script> | ||
</steps> | ||
</rule> | ||
|
||
</rules> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# | ||
# THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS | ||
# FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS. | ||
# | ||
|
||
xld: | ||
image: xebialabs/xld_dev_run:v7.0.0.1 | ||
volumes: | ||
- ~/xl-licenses:/license | ||
- ./../../../../:/data | ||
ports: | ||
- "14516:4516" |
Binary file added
BIN
+2.13 KB
src/test/resources/docker/initialize/cis/Applications/Duck Creek/1.0/DC3/DC_FILE2.zip
Binary file not shown.
Binary file added
BIN
+106 KB
...esources/docker/initialize/cis/Applications/PetClinic-ear/1.0/PetClinic/PetClinic-1.0.ear
Binary file not shown.
Oops, something went wrong.