Export specific Deployment Data

Hello I need to know how to export the date, time, and version number of any deployment we had to production 2014. How would I go about finding this information.
Thanks for your help

Hi Cagin,

Thanks for getting in touch!

We don’t have a “supported” way of doing this right now. However in 3.1, which is in a public pre-release now and should be released next week, we have a reporting API endpoint that will do exactly what you want.

What version are you running now ?

Regards

Damian

We are on 2.5.7.38
Please let me know if there is anyway to get this done. Or if the only way
to do this is to upgrade.
Thanks

Hi,

You could get this information by using the Octopus API, though it could get tricky because you need to make quite a bunch of API calls for the data you need. I’ve already created a Powershell cmdlet as part of the Octoposh module that takes care of this and that might work with 2.5 (it was developed in 2.6, but I dont think there’s gonna be a problem using it in 2.5).

Octoposh module: http://dalmirog.github.io/OctoPosh/

Cmdlet Get-OctopusDeployment: https://github.com/Dalmirog/OctoPosh/wiki/Get-OctopusDeployment

Syntax to get deployments for all 2014

[datetime]$StartDate = "1/1/2014 00:00:00 AM"
[datetime]$EndDate = "12/31/2015 11:59:59 PM"

$Deployments = Get-OctopusDeployment -After $StartDate -Before $EndDate

$Deployments

$deployments will have a collection of objects with a lot more info about your deployments than just date, time and version number:

ProjectName         : Powershell2
EnvironmentName     : Dev
DeploymentstartTime : 9/10/2015 11:36:21 AM
DeploymentEndTime   : 9/10/2015 11:36:36 AM
DeploymentStartedBy : dalmiro.granias
ID                  : Deployments-357
Duration            : 0.25
Status              : Success
ReleaseVersion      : 0.0.14
ReleaseCreationDate : 9/10/2015 11:36:08 AM
ReleaseNotes        : 
ReleaseCreatedBy    : dalmiro.granias
Package             : {@{Name=TestWebApp; Version=1.0.0}, @{Name=TestConfig; Version=1.0.8}}

From here it should be easy to use the output of the cmdlet and store it wherever you need it.

Hope that helps,

Dalmiro