Automatic lifecycle deployment not working for optional phase

Hi,

first of all, thanks for giving us this great tool. It’s always a pleasure to work with it.

I recently encountered an issue trying to get the automatic deployment working. Our setup has a lifecycle with 4 phases (DEV, AT, UAT, PRD), with multiple environments in each phase and DEV being optional. I would like to set up the lifecycle to automatically deploy new packages to one environment in DEV, but keep the phase optional. However, this does not seem to work, since the phase is optional it will be skipped automatically and therefore the deployment trigger of “the release being in that phase” never occurs.

I have thought about multiple fixes, but none really work:

  1. just make the DEV phase not optional (this is what I currently do as a workaround). The issue here is that I do not want a failing deployment to DEV to prevent an AT deployment, and I also want to be able to trigger an AT deployment while DEV is still deploying (sometimes deployments can take a long time).
  2. merge DEV and AT into one non-optional phase. This does not work since I want to force a deployment to at least one environment in the AT phase before going to UAT and with a merged phase I could not distinguish between DEV and AT environments

Lastly, I found it very counter intuitive that this does not work since the UI does give no indication and google didn’t help much either. I found all of this out by trial and error. Therefore the UI should at least give a warning, but better it should simply allow automatically deploying to optional phases.

Hi Jonathan,

Thanks for getting in touch! That’s really great to hear you’ve had a great experience so far with Octopus - thank you for those kind words. :slight_smile:

I’m sorry to hear you’re hitting this confusing and unexpected behavior. I’ve been able to reproduce this based on what you’ve described. It’s actually currently a known issue which has been reported here.

Would an alternative workaround to address your requirements be to pull the single environment out of the optional phase and create another dedicated first phase that’s not optional with it? This will allow the newly created release to be deployed automatically to this environment while keeping the other environments within the next optional phase.

I’d like to hear if this option would be of any help. Let me know if you have any further questions or concerns as well moving forward. :slight_smile:

Best regards,

Kenny

Hi Kenny, thanks for the quick reply and pointing me to that GitHub issue.

If I understand you correctly your suggestion is basically the same as my option 1 (which is the workaround I am using already). It would not really address my requirements since it would still force me to have a finished and successful deployment to a DEV environment before I can deploy to an AT environment while I want to be able to deploy to AT regardless of DEV but still have automatic deployments to DEV.

However, considering the age of the GitHub issue and the low activity on it I assume this issue has low priority. While the workarounds we mentioned work and the downsides are somewhat acceptable I still feel this should at least be addressed in the UI with a warning that automatic deployments for optional phases do not work.

Cheers,
Jonathan

Hi Jonathan,

You’re very welcome! Thanks for following up. We agree this would definitely be good to fix at some point, though unfortunately other unrelated issues have been considered higher priority. Generally speaking people have gotten around this issue by creating and deploying the release from their build servers - would this approach help?

We definitely appreciate the input from a usability perspective. I’m not sure if we would address it as a warning in the UI, or just fix the issue directly eventually. I’d recommend tracking that issue for any updates. For the time being, I hope the workaround of triggering the first deployment via your build server helps in your scenario. :slight_smile:

Best regards,

Kenny

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