Generating Deployment Task List

Hello,

I’m trying to use powershell and the Octopus API to generate a dynamic list of the process tasks run a deployment. This would be the same list displayed in the task summary of a deployment (ie. http://octopusdeploy.com/app#/projects/myDeploymentProjec/releases/1.0.0/deployments/Deployments-30000?activeTab=taskSummary)
Our deployment process is over 100 steps and is run for over 150 tenants. Each tenant likely has a different combination of steps it will run, thus the need to build this list dynamically. We use tags to control which steps are run for which clients and run large batches of tenant deployments at a time. As such, the “SkipActions” method does not return all the process steps not run for a particular client since actions that aren’t run by virtue of not having the tag are not included. I believe this only includes steps that are manually skipped (also it does not include disabled steps.) How can I find how Octopus generates the Task Summary for a deployment? How can I generate a dynamic list of the executed actions for a given deployment?

Task Summary example:
https://lh4.googleusercontent.com/NcaPZTbjVgEvTjVh1Qe4E0uvvQRbwGKplDmVm-56rPhGCz16oe4zrIVO8oQPOXtOTaJQuClhs_whSyoioH6DcsUfGxWH9uH5tCAvSqxnGzLqSsAiLqEA_V8XniQDwDrWeEN0QWvw

Thank you,
Barry

Untagged steps can be found in the verbose task log ie:
Step 37: Deploy CERF Windows Service does not apply to the current tenant due to missing tenant tags and will not be executed

These steps are not included in the return data of the “SkipActions” method

Hi Barry,

Thanks for getting in touch!

Unfortunately I don’t think we have a way (outside of a deployment) to be able to get the information that you are after. The problem that we (currently) have is that we have no way of triggering an evaluation of all the Tennant tags outside of pushing the the deployment process through our deployment pipeline.

We have investigated what would be required to make a dry run deployment option available (see here), however at this point in time the engineering effort involved seems to outweigh the features usefulness.

Sorry that I don’t have any better news for you, please feel free to comment on the linked UserVoice so that we can review your feedback

Thanks Barry, please let me know if there is anything else that I can assist with!

Regards
Alex

Hi Alex,

Thank you for the response! This would actually be something we include in our deployment. Sounds like you are saying it’s possible to generate this list from the deployment, can you enlighten me on how to accomplish this? In short, we want the last step of our Octopus deployment to kick off some smoke tests. In order to do this, we need to know which steps were executed in the current deployment. I figure the deployment in some way stores this information, either temporarily or permanently. Is there a way to access this information?

Thank you,
Barry

Hi Barry,

The only place that we currently store this information is in the tasks logs for that deployment, which is either downloadable through the UI, or is written to disk at c:\Octopus\TaskLogs\. You could run a script over the log file to identify which steps completed for that deployment as they all conform to a standard, e.g. == Success: Step 3: Deploy to IIS ==

While I haven’t attempted to do this myself, I would suggest that using the system variable Octopus.Task.Id would be a good place to start to identify the correct logs to read in with your script.

Regards,
Alex

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.