Getting all the releases or projects from a specified envir

Is it possible to get all the releases or projects from a specified envir c#

Hi,

Thanks for reaching out. Not exactly, but you can get the following:

  1. This snippet will help you return the dashboard info.
string octoUrl = "Your Octopus URL" ;
string apiKey = "Your API Key";
var client = new OctopusClient(new OctopusServerEndpoint(octoUrl, apiKey));
var repo = new OctopusRepository(client);
var Dashboard = repo.Dashboards.GetDashboard();

The results will have an items member which will contain each project’s status by environment. You can use this to get all the projects that have deployed to a specified environment. You will only get the latest release deployed though.

  1. This snippet will help you getting the releases by project
string octoUrl = "Your Octopus URL" ;
string apiKey = "Your API Key";

var client = new OctopusClient(new OctopusServerEndpoint(octoUrl, apiKey));
var repo = new OctopusRepository(client);

var project = repo.Projects.FindByName("Your Project Name");

var releases = repo.Projects.GetReleases(project);

Regards,

Dalmiro

Hi,

Is it possible to kick off an automated test after a deployment?

Hi,

You can trigger pretty much any process at the end of a deployment from Octopus. If you need to run interactive tests with a browser, I’d recommend you to call your testing framework from your build server though. We’ve seen some issue with Octopus trying to run Interactive tests (as Octopus runs as a non-interactive service). You could trigger the build that runs the tests from Octopus.

Thanks,

Dalmiro