Skip to content

Instantly share code, notes, and snippets.

@droyad
Created January 31, 2018 22:04
Show Gist options
  • Save droyad/b8923fbf4af5c50c2f41ca3a760763f8 to your computer and use it in GitHub Desktop.
Save droyad/b8923fbf4af5c50c2f41ca3a760763f8 to your computer and use it in GitHub Desktop.
Find Projects that use Library Variable Set
var endpoint = new OctopusServerEndpoint("http://localhost");
var repository = new OctopusRepository(endpoint);
repository.Users.SignIn("Admin", "foo");
var mySet = repository.LibraryVariableSets.FindByName("MySet");
var projectNames = repository.Projects.GetAll().Where(p => p.IncludedLibraryVariableSetIds.Contains(mySet.Id)).Select(p => p.Name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment