CreateFromGithub() public method

Creates a website given github credentials
public CreateFromGithub ( Website website, GitDetails gitDetails ) : void
website Elastacloud.AzureManagement.Fluent.Types.Websites.Website
gitDetails Elastacloud.AzureManagement.Fluent.Types.Websites.GitDetails the details of the github repo
return void
Ejemplo n.º 1
0
        public void Execute()
        {
            var site = new Website()
                           {
                               ComputeMode = ComputeMode.Dedicated,
                               Name = "fluentwebtest38",
                               WebsiteParameters = new WebsiteParameters()
                                                       {
                                                           CurrentNumberOfWorkers = 1
                                                       }
                           };
            site.Config.AppSettings.Add("test1", "test2");
            site.Config.HttpLoggingEnabled = true;
            site.Config.RequestTracingEnabled = true;
            site.Config.DetailedErrorLoggingEnabled = true;
            site.Config.ConnectionStrings.Add(new ConnStringInfo(){Name="test", ConnectionString = "test", Type="SQLAzure"});
            System.Console.WriteLine("Creating website");
            System.Console.WriteLine("================");

            var client = new WebsiteClient(_subscriptionId, _certificate);
            client.CreateFromGithub(site, new GitDetails() { Username = "******", Password = "******", RepositoryName = "test-sample-for-azure-deployments" });
        }