Last active
August 29, 2015 14:28
-
-
Save Dalmirog-zz/48ca5fbe45908d1275f3 to your computer and use it in GitHub Desktop.
Add phase to a lifecycle
This file contains hidden or 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
#### Adding a phase to a lifecycle #### | |
$lifecycle = Get-OctopusLifeCycle -LifeCycleName "MyLifeCycle" -resourceonly | |
$phase = New-Object Octopus.Client.Model.PhaseResource | |
$phase.Name = "Staging" | |
$phase.OptionalDeploymentTargets.Add("Environments-20") #Adding optional Environment to phase | |
#$phase.AutomaticDeploymentTargets.Add("Environments-30") #Automatic Environment | |
$phase.MinimumEnvironmentsBeforePromotion = 0 | |
$lifecycle.Phases.Add($phase) | |
Update-OctopusResource -Resource $lifecycle -Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment