Example #1
0
        protected ApiCommand(IOctopusSessionFactory sessionFactory, ILog log)
        {
            this.sessionFactory = sessionFactory;
            this.log            = log;

            client = new Lazy <IOctopusSession>(CreateAndInitializeClient);
        }
Example #2
0
        protected ApiCommand(IOctopusSessionFactory client, ILog log)
        {
            this.log    = log;
            this.client = client;

            session = new Lazy <IOctopusSession>(client.OpenSession);
        }
Example #3
0
        protected ApiCommand(IOctopusSessionFactory client, ILog log)
        {
            this.log = log;
            this.client = client;

            session = new Lazy<IOctopusSession>(client.OpenSession);
        }
Example #4
0
        protected ApiCommand(IOctopusSessionFactory sessionFactory, ILog log)
        {
            this.sessionFactory = sessionFactory;
            this.log = log;

            client = new Lazy<IOctopusSession>(CreateAndInitializeClient);
        }
        public CreateReleaseCommand(IOctopusSessionFactory session, ILog log, IDeploymentWatcher deploymentWatcher)
            : base(session, log)
        {
            this.deploymentWatcher = deploymentWatcher;

            DeployToEnvironmentNames = new List<string>();
            DeploymentStatusCheckSleepCycle = TimeSpan.FromSeconds(10);
            DeploymentTimeout = TimeSpan.FromMinutes(10);
        }
        public DeployReleaseCommand(IOctopusSessionFactory session, ILog log, IDeploymentWatcher deploymentWatcher)
            : base(session, log)
        {
            this.deploymentWatcher = deploymentWatcher;

            DeployToEnvironmentNames        = new List <string>();
            DeploymentStatusCheckSleepCycle = TimeSpan.FromSeconds(10);
            DeploymentTimeout = TimeSpan.FromMinutes(10);
        }
        public void SetUp()
        {
            configFile = Path.GetTempFileName();
            sessionFactory = Substitute.For<IOctopusSessionFactory>();
            command = new TestCommand(sessionFactory, Substitute.For<ILog>());

            session = Substitute.For<IOctopusSession>();
            sessionFactory.OpenSession(Arg.Any<Uri>(), Arg.Any<NetworkCredential>(), Arg.Any<string>(), Arg.Any<bool>()).Returns(session);
            session.RootDocument.Returns(new RootDocument());
        }
Example #8
0
        public CreateReleaseCommand(IOctopusSessionFactory session, ILog log, IDeploymentWatcher deploymentWatcher)
            : base(session, log)
        {
            this.deploymentWatcher = deploymentWatcher;

            DeployToEnvironmentNames        = new List <string>();
            DeploymentStatusCheckSleepCycle = TimeSpan.FromSeconds(10);
            DeploymentTimeout             = TimeSpan.FromMinutes(10);
            PackageVersionNumberOverrides = new Dictionary <string, string>();
        }
Example #9
0
        public CreateReleaseCommand(IOctopusSessionFactory session, ILog log, IDeploymentWatcher deploymentWatcher, IPackageVersionResolver versionResolver)
            : base(session, log)
        {
            this.deploymentWatcher = deploymentWatcher;
            this.versionResolver   = versionResolver;

            DeployToEnvironmentNames        = new HashSet <string>(StringComparer.OrdinalIgnoreCase);
            DeploymentStatusCheckSleepCycle = TimeSpan.FromSeconds(10);
            DeploymentTimeout = TimeSpan.FromMinutes(10);
        }
        public void SetUp()
        {
            configFile     = Path.GetTempFileName();
            sessionFactory = Substitute.For <IOctopusSessionFactory>();
            command        = new TestCommand(sessionFactory, Substitute.For <ILog>());

            session = Substitute.For <IOctopusSession>();
            sessionFactory.OpenSession(Arg.Any <Uri>(), Arg.Any <NetworkCredential>(), Arg.Any <string>(), Arg.Any <bool>()).Returns(session);
            session.RootDocument.Returns(new RootDocument());
        }
        public CreateReleaseCommand(IOctopusSessionFactory session, ILog log, IDeploymentWatcher deploymentWatcher, IPackageVersionResolver versionResolver)
            : base(session, log)
        {
            this.deploymentWatcher = deploymentWatcher;
            this.versionResolver = versionResolver;

            DeployToEnvironmentNames = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
            DeploymentStatusCheckSleepCycle = TimeSpan.FromSeconds(10);
            DeploymentTimeout = TimeSpan.FromMinutes(10);
        }
Example #12
0
        protected ApiCommand(IOctopusSessionFactory client, ILog log)
        {
            this.client = client;
            this.log = log;

            options = new OptionSet
            {
                {"server=", "The base URL for your Octopus server - e.g., http://your-octopus/", v => serverBaseUrl = v},
                {"user="******"[Optional] Username to use when authenticating with the server.", v => user = v},
                {"pass=|password="******"[Optional] Password to use when authenticating with the server.", v => pass = v},
                {"apiKey=", "Your API key. Get this from the user profile page.", v => apiKey = v},
                {"configFile=", "[Optional] Text file of default values, with one 'key = value' per line.", v => ReadAdditionalInputsFromConfigurationFile(v)},
                {"debug", "[Optional] Enable debug logging", v => enableDebugging = true},
                {"ignoreSslErrors", "[Optional] Set this flag if your Octopus server uses HTTPS but the certificate is not trusted on this machine. Any certificate errors will be ignored. WARNING: this option may create a security vulnerability.", v => ignoreSslErrors = true},
                {"enableServiceMessages", "[Optional] Enable TeamCity service messages when logging.", v => log.EnableServiceMessages()}
            };
        }
Example #13
0
        protected ApiCommand(IOctopusSessionFactory client, ILog log)
        {
            this.client = client;
            this.log    = log;

            options = new OptionSet
            {
                { "server=", "The base URL for your Octopus server - e.g., http://your-octopus/", v => serverBaseUrl = v },
                { "user="******"[Optional] Username to use when authenticating with the server.", v => user = v },
                { "pass=|password="******"[Optional] Password to use when authenticating with the server.", v => pass = v },
                { "apiKey=", "Your API key. Get this from the user profile page.", v => apiKey = v },
                { "configFile=", "[Optional] Text file of default values, with one 'key = value' per line.", v => ReadAdditionalInputsFromConfigurationFile(v) },
                { "debug", "[Optional] Enable debug logging", v => enableDebugging = true },
                { "ignoreSslErrors", "[Optional] Set this flag if your Octopus server uses HTTPS but the certificate is not trusted on this machine. Any certificate errors will be ignored. WARNING: this option may create a security vulnerability.", v => ignoreSslErrors = true },
                { "enableServiceMessages", "[Optional] Enable TeamCity service messages when logging.", v => log.EnableServiceMessages() }
            };
        }
 public ListLatestDeploymentsCommand(IOctopusSessionFactory session, ILog log)
     : base(session, log)
 {
 }
 public TestCommand(IOctopusSessionFactory client, ILog log)
     : base(client, log)
 {
 }
 public TestCommand(IOctopusSessionFactory client, ILog log)
     : base(client, log)
 {
 }
 public ListEnvironmentsCommand(IOctopusSessionFactory session, ILog log)
     : base(session, log)
 {
 }
 public ListLatestDeploymentsCommand(IOctopusSessionFactory session, ILog log)
     : base(session, log)
 {
 }
Example #19
0
 public CreateReleaseCommand(IOctopusSessionFactory sessionFactory, ILog log) : base(sessionFactory, log)
 {
     DeployToEnvironmentNames = new List <string>();
 }
 public CreateReleaseCommand(IOctopusSessionFactory sessionFactory, ILog log)
     : base(sessionFactory, log)
 {
     DeployToEnvironmentNames = new List<string>();
 }
 public ListEnvironmentsCommand(IOctopusSessionFactory session, ILog log) : base(session, log)
 {
 }
 public ListProjectsCommand(IOctopusSessionFactory session, ILog log)
     : base(session, log)
 {
 }
 public ListProjectsCommand(IOctopusSessionFactory session, ILog log)
     : base(session, log)
 {
 }
 public DeleteReleasesCommand(IOctopusSessionFactory client, ILog log) : base(client, log)
 {
 }
 public DeleteReleasesCommand(IOctopusSessionFactory client, ILog log)
     : base(client, log)
 {
 }