Octopus Hightlight environment in Blue /Green deployment

I am using Octopus Cloud and have setup Blue/Green deployment for the environments. In a Blue Green model, one of the either Blue or Green will be Standby and other Prod. I wanted to display on Dashboard or Project Overview tab which one is current Standby and which one is Prod. Is there a way environment can be flagged or highlighted?

In my case, the most recently deployed environment in Blue/Green model is always Standby because we will always only deploy to standby. Is there a way I can calculate the most recently deployed environment and get environment name of it?

Hi @vaibhavn

Thanks for your question!

My colleague wrote an article to a similar question about determining which environment in Blue/Green is actually deployed to here:

However, the difference here is that they had one environment, and used the F5 load balancer to determine which “environment” was actually active.

To answer your questions:

Is there a way environment can be flagged or highlighted?

There’s no way to highlight a specific item on the dashboard for example that a particular environment is the one deployed as “active” (other than to have an environment called Production and deploy to it, but even then it won’t say whether it’s blue or green).

In case you haven’t seen it, I also wrote up the current ways you can use Octopus with Blue/Green:

It’s quite a long read, but it does give some pros and cons of each approach you may not have considered.

Is there a way I can calculate the most recently deployed environment and get the environment name of it?

This will depend on exactly what criteria you want to sue to select as “most recently” deployed. But I think it should be possible to use the Octopus REST API. We have a bunch of examples looking at deployments in our GitHub repo here:

For example this script:

Gets the latest release in a particular environment (and then redeploys it). You wouldn’t need the redeployment part, but could provide an example of a way you can query the Octopus REST API and then retrieve the details to meet your requirements.

I hope that helps!