Auto deployments on new release

I am trying to set up a trigger which will automatically deploy the latest release into an environment as soon as the release is available in Octopus.
Been trying to follow the steps in https://octopus.com/docs/deployment-process/project-triggers/automatic-deployment-triggers but the deployment never actually kicks off.
I have the events as Machine enabled, Machine found healthy, Machine found to have warnings as in the guide but still nothing happens, I must be missing something?

Hi,

Thanks for getting in touch! I suspect you’re after the automatic deployment environment feature which is configurable in your project’s lifecycle (located in Library > Lifecycles > [lifecycle] in the web portal). When adding your first environment to your first phase, you can select Deploy automatically to this environment as soon as the release enters this phase. which will then deploy straight to it once the release is created. I’ve attached a screenshot below to visualize this. :slight_smile:

The following doc includes some additional information.

I hope this helps! Let me know what you think or if you have any further questions moving forward.

Best regards,

Kenny

Thanks Kenny, that seems to work fine for our simpler Projects but we do have some which are a bit more complicated, i.e. same project can be deployed to different environments and it does contain different codebase and the only way to differentiate is the release description and the auto-deploy will deploy latest version regardless which will not work for us.
Do you have a link to some c# examples of deploying programmatically? I can set something up like this and then make sure only the correct release gets deployed.

Hi,

You’re welcome! To assist with your followup question, perhaps you’d benefit from our channels feature. Channels would allow you to use multiple separate lifecycles in a single project and also define version rules within any given channel to control which package versions a release will use when deploying through that channel.

We have some sample C# scripts using the Octopus.Client (an open source .NET library) at the following link. I don’t think any in this sample repo are exactly what you’re after, but perhaps this would provide a good starting point. :slight_smile:

I hope this helps! Let me know how you go or if you have any further questions moving forward.

Best regards,

Kenny

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