Created
December 15, 2015 17:54
-
-
Save Dalmirog-zz/e062641db30402f28334 to your computer and use it in GitHub Desktop.
Getting Nuget packages of latest deployments
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
ProjectName EnvironmentName ReleaseVersion packages | |
----------- --------------- -------------- -------- | |
ConfigFiles Development 0.0.16 {@{Name=TestConfig; Version=2.0.42}} | |
ConsoleApp Development 0.0.1 {@{Name=Testapp; Version=1.0.13}} | |
Powershell1 Development 0.0.6 {@{Name=Testapp; Version=1.0.15}} | |
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
$projects = Get-OctopusProject -ResourceOnly | |
$list = @() | |
foreach($project in $projects){ | |
$release = Get-OctopusRelease -ProjectName $project.name -ResourceOnly -Latest 1 | |
$deployments = Get-OctopusDeployment -ProjectName $project.name | ?{$_.releaseversion -eq $release.version} | |
foreach($deployment in $deployments){ | |
$obj = [PSCustomObject]@{ | |
ProjectName = $project.Name | |
EnvironmentName = $deployment.EnvironmentName | |
ReleaseVersion = $deployment.releaseversion | |
packages = $deployment.package | |
} | |
$list += $obj | |
} | |
} | |
$list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment