As per my earlier post in the Questions about scheduling deployments, I thought I’d use the octo.exe to grab the release number of the last deployment, but when running octo.exe list-latestdeployments with both --project and --environment specified, I get every single deployed from that project to that environment, which is not what the word “latest” means, nor meets the list-latestdeployments description of “List the releases last-deployed in each environment”
This is using Octo Tools 3.3.2 against a 3.2.24 server - is this expected or is the list latest not performing as it should?
This so called fix has broken our rollback process for deployments. The switch is list-latestdeployments not list-latestdeployment. We are using this to return all deployments to a specific environment and displaying only the latest few as a roll back option for our test and production environments. This process has been working of over a year now and is now broken. Please return the original functionality and provide a way to only return the latestdeployment.
I forgot to mention that the functionality isn’t consistent. When the --environment flag is used it only lists a single deployment, however is the flag is not included it lists all deployments for all environments. Running octo.exe with out the flag is correct and the addition of the environment returns unexpected results.
About your broken deployment: how are you using Octo.exe list-latestdeployments for your rollback strategy? are you parsing the text output it returns? If you can explain me a bit more how you are using it, perhaps I can make an API script that returns similar info (in an object form) so you can use it instead of that command.
Thank you for the response. I was thinking about this over the weekend as well. I thought a parameter such as -top would be a great addition and that the parameter could default have a default value and it could be overridden to any length by the user.
As for how I am using octo.exe for my roll-back.
We are using Jenkins to manage all of our builds and promotions.
After calling create-release and deploy-release jobs, I run a PowerShell script that takes the list of all deployments from the just deployed job and parses it for successful job version.
The list of version numbers are then sorted and stored.
This list contains the latest deployed version as well the desired number of successful versions available for roll-back. (configurable in the PS Script)
From then on when the deployment is run it presents the currently installed version as well as the available to install versions. ( screen shot from an older job)
[cid:85FED6B2-9AD6-4024-AACF-90CB060400C0]
The current version of octo.exe only returns one entry to fill the list.
The option “–list-releases” does not have a “—environment” flag. This flag would do the trick if the return list contained success/failure information for each release in the environment.
If the list-releases contained this information the list-latestdeployments would not need to be changed. It might be a better place to put the functionality as well.