Пример #1
0
 static void Main(string[] args)
 {
     var server     = EnvironmentHelpers.GetServerUrl();
     var apiKey     = EnvironmentHelpers.GetApiKey();
     var endpoint   = new OctopusServerEndpoint(server, apiKey);
     var repository = new OctopusRepository(endpoint);
 }
Пример #2
0
        static void Main(string[] args)
        {
            var server     = EnvironmentHelpers.GetServerUrl();
            var apiKey     = EnvironmentHelpers.GetApiKey();
            var endpoint   = new OctopusServerEndpoint(server, apiKey);
            var repository = new OctopusRepository(endpoint);

            var tenantResources = repository.Tenants.FindByName("Team 😄");

            ConsoleHelpers.Dump(tenantResources);

            Console.ReadKey();
        }
Пример #3
0
        static void Main(string[] args)
        {
            var server     = EnvironmentHelpers.GetServerUrl();
            var apiKey     = EnvironmentHelpers.GetApiKey();
            var endpoint   = new OctopusServerEndpoint(server, apiKey);
            var repository = new OctopusRepository(endpoint);

            var guest = repository.Configuration.Get <GuestConfigurationResource>();

            ConsoleHelpers.Dump(guest);
            guest.IsEnabled = !guest.IsEnabled;
            guest           = repository.Configuration.Modify(guest);
            ConsoleHelpers.Dump(guest);
            Console.ReadLine();
        }
Пример #4
0
        static void Main(string[] args)
        {
            var server     = EnvironmentHelpers.GetServerUrl();
            var apiKey     = EnvironmentHelpers.GetApiKey();
            var endpoint   = new OctopusServerEndpoint(server, apiKey);
            var repository = new OctopusRepository(endpoint);

            var project = repository.Projects.GetAll().First();

            KeyValuePair <string, Href> deploymentProcess = project.Links.Where(l => l.Key.Equals("DeploymentProcess")).FirstOrDefault();

            ConsoleHelpers.Dump(deploymentProcess);

            //return _octopus.Repository.Client.Get<ReleaseTemplateResource>(deploymentProcess.Value + "/template?channel=" + templateChannel.Id);

            Console.ReadLine();
        }
Пример #5
0
        static void Main(string[] args)
        {
            var server     = EnvironmentHelpers.GetServerUrl();
            var apiKey     = EnvironmentHelpers.GetApiKey();
            var endpoint   = new OctopusServerEndpoint(server, apiKey);
            var repository = new OctopusRepository(endpoint);

            var project = repository.Projects.GetAll().First();


            //string deploymentProcess = project.Link("DeploymentProcess");

            //ConsoleHelpers.Dump(project.Links.Where(x => x.Key.Equals("DeploymentProcess")));
            KeyValuePair <string, Href> deploymentProcess = project.Links.Where(l => l.Key == "DeploymentProcess").FirstOrDefault();

            ConsoleHelpers.Dump(deploymentProcess);

            Console.ReadLine();
        }