Created
September 20, 2017 09:39
-
-
Save tobiaszuercher/ca14cadb84889afd60dbb5ab5c3ccfef to your computer and use it in GitHub Desktop.
PreDeploy script to use transformer with octopus deploy
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
$transformer_exe = Resolve-Path "tools/transformer.exe" | |
$path = pwd | select -ExpandProperty Path | |
$args = @("transform", "--environment", $OctopusParameters["Octopus.Environment.Name"], "--path", $path, "--delete-templates") | |
if ([string]::IsNullOrEmpty($OctopusParameters["transformer.masterkey"]) -eq $false) { | |
write-host "add password" | |
$args += "--password" | |
$args += $OctopusParameters["transformer.masterkey"] | |
} | |
& $transformer_exe $args | |
# self destruction... | |
Remove-Item .transformer -Force -Recurse | |
Remove-Item tools -Force -Recurse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment