Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Service: Supports deploying from GitHub, Git, Mercurial #1298

Merged
merged 3 commits into from
Dec 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion azure-mgmt-website/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

<artifactId>azure-mgmt-website</artifactId>
<packaging>jar</packaging>
<version>1.0.0-SNAPSHOT</version>

<name>Microsoft Azure SDK for Website Management</name>
<description>This package contains Microsoft Azure Website Management SDK.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById;
import rx.Observable;

/**
* Entry point for app service plan management API.
Expand All @@ -23,4 +24,12 @@ public interface AppServicePlans extends
SupportsGettingByGroup<AppServicePlan>,
SupportsGettingById<AppServicePlan>,
SupportsDeletingByGroup {
/**
* Gets the information about a resource from Azure based on the resource name and the name of its resource group.
*
* @param resourceGroupName the name of the resource group the resource is in
* @param name the name of the resource. (Note, this is not the ID)
* @return an immutable representation of the resource
*/
Observable<AppServicePlan> getByGroupAsync(String resourceGroupName, String name);
}
Original file line number Diff line number Diff line change
Expand Up @@ -290,4 +290,4 @@ interface WithAttach<ParentT> extends
Contact build();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
public final class JavaVersion {
/** Static value 'Off' for JavaVersion. */
public static final JavaVersion OFF = null;
public static final JavaVersion OFF = new JavaVersion("");

/** Static value Java 7 newest for JavaVersion. */
public static final JavaVersion JAVA_7_NEWEST = new JavaVersion("1.7");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.management.website;

import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.resources.fluentcore.model.Wrapper;
import com.microsoft.azure.management.website.implementation.UserInner;

/**
* A credential for publishing to a web app.
*/
@Fluent
public interface PublishingCredentials extends
Wrapper<UserInner> {
/**
* @return the username used for FTP and Git publishing.
*/
String username();

/**
* @return the password used for FTP and Git publishing.
*/
String password();
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,112 @@ public interface WebApp extends
*/
interface Definition extends
DefinitionStages.Blank,
DefinitionStages.WithGroup {
DefinitionStages.WithRegion,
DefinitionStages.WithAppServicePlan,
DefinitionStages.WithNewAppServicePlan {
}

/**
* Grouping of all the web app definition stages.
*/
interface DefinitionStages {
/**
* A web app definition allowing resource group to be set.
*/
interface Blank extends GroupableResource.DefinitionStages.WithGroup<WithAppServicePlan> {
}

/**
* The first stage of the web app definition.
*/
interface Blank extends GroupableResource.DefinitionWithRegion<WithGroup> {
interface WithRegion extends GroupableResource.DefinitionWithRegion<WithNewAppServicePlan> {
}

/**
* A web app definition allowing resource group to be set.
* A web app definition allowing app service plan to be set.
*/
interface WithGroup extends GroupableResource.DefinitionStages.WithGroup<
WebAppBase.DefinitionStages.WithAppServicePlan<WebApp>> {
interface WithAppServicePlan {
/**
* Creates a new app service plan to use.
* @return the next stage of the web app definition
* @param name the name of the app service plan
*/
WithRegion withNewAppServicePlan(String name);

/**
* Uses an existing app service plan for the web app.
* @param appServicePlanName the name of the existing app service plan
* @return the next stage of the web app definition
*/
WebAppBase.DefinitionStages.WithHostNameBinding<WebApp> withExistingAppServicePlan(String appServicePlanName);
}

/**
* As web app definition allowing more information of a new app service plan to be set.
*/
interface WithNewAppServicePlan {
/**
* Creates a new free app service plan to use. No custom domains or SSL bindings are available in this plan.
* @return the next stage of the web app definition
*/
WebAppBase.DefinitionStages.WithCreate<WebApp> withFreePricingTier();

/**
* Creates a new app service plan to use.
* @param pricingTier the pricing tier to use
* @return the next stage of the web app definition
*/
WebAppBase.DefinitionStages.WithHostNameBinding<WebApp> withPricingTier(AppServicePricingTier pricingTier);
}
}

/**
* Grouping of all the web app update stages.
*/
interface UpdateStages {
/**
* A web app update allowing app service plan to be set.
*/
interface WithAppServicePlan {
/**
* Creates a new app service plan to use.
* @return the next stage of the web app update
* @param name the name of the app service plan
*/
WithNewAppServicePlan withNewAppServicePlan(String name);

/**
* Uses an existing app service plan for the web app.
* @param appServicePlanName the name of the existing app service plan
* @return the next stage of the web app update
*/
Update withExistingAppServicePlan(String appServicePlanName);
}

/**
* As web app update allowing more information of a new app service plan to be set.
*/
interface WithNewAppServicePlan {
/**
* Creates a new free app service plan to use. No custom domains or SSL bindings are available in this plan.
* @return the next stage of the web app update
*/
Update withFreePricingTier();

/**
* Creates a new app service plan to use.
* @param pricingTier the pricing tier to use
* @return the next stage of the web app update
*/
Update withPricingTier(AppServicePricingTier pricingTier);
}
}

/**
* The template for a web app update operation, containing all the settings that can be modified.
*/
interface Update extends WebAppBase.Update<WebApp> {
interface Update extends
WebAppBase.Update<WebApp>,
UpdateStages.WithAppServicePlan {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ public interface WebAppBase<T extends WebAppBase<T>> extends

Map<String, ConnectionString> getConnectionStrings();

PublishingCredentials getPublishingCredentials();

WebAppSourceControl getSourceControl();

/**
* Starts the web app or deployment slot.
*/
Expand Down Expand Up @@ -277,7 +281,6 @@ public interface WebAppBase<T extends WebAppBase<T>> extends
* Container interface for all the definitions that need to be implemented.
*/
interface Definition<FluentT> extends
DefinitionStages.WithAppServicePlan<FluentT>,
DefinitionStages.WithHostNameSslBinding<FluentT>,
DefinitionStages.WithWebContainer<FluentT> {
}
Expand All @@ -286,33 +289,6 @@ interface Definition<FluentT> extends
* Grouping of all the site definition stages.
*/
interface DefinitionStages {
/**
* A web app definition allowing app service plan to be set.
* @param <FluentT> the type of the resource, either a web app or a deployment slot
*/
interface WithAppServicePlan<FluentT> {
/**
* Creates a new free app service plan to use. No custom domains or SSL bindings are available in this plan.
* @return the next stage of the web app definition
*/
WithCreate<FluentT> withNewFreeAppServicePlan();

/**
* Creates a new app service plan to use.
* @param name the name of the app service plan
* @param pricingTier the pricing tier to use
* @return the next stage of the web app definition
*/
WithHostNameBinding<FluentT> withNewAppServicePlan(String name, AppServicePricingTier pricingTier);

/**
* Uses an existing app service plan for the web app.
* @param appServicePlanName the name of the existing app service plan
* @return the next stage of the web app definition
*/
WithHostNameBinding<FluentT> withExistingAppServicePlan(String appServicePlanName);
}

/**
* A web app definition stage allowing host name binding to be specified.
* @param <FluentT> the type of the resource, either a web app or a deployment slot
Expand Down Expand Up @@ -587,6 +563,18 @@ interface WithConnectionString<FluentT> {
WithCreate<FluentT> withStickyConnectionString(String name, String value, ConnectionStringType type);
}

/**
* A web app definition stage allowing source control to be set.
* @param <FluentT> the type of the resource, either a web app or a deployment slot
*/
interface WithSourceControl<FluentT> {
/**
* Starts the definition of a new source control.
* @return the first stage of a source control definition
*/
WebAppSourceControl.DefinitionStages.Blank<WithCreate<FluentT>> defineSourceControl();
}

/**
* A site definition with sufficient inputs to create a new web app /
* deployments slot in the cloud, but exposing additional optional
Expand All @@ -601,41 +589,15 @@ interface WithCreate<FluentT> extends
WithClientCertEnabled<FluentT>,
WithSiteConfigs<FluentT>,
WithAppSettings<FluentT>,
WithConnectionString<FluentT> {
WithConnectionString<FluentT>,
WithSourceControl<FluentT> {
}
}

/**
* Grouping of all the web app update stages.
*/
interface UpdateStages {
/**
* The stage of the web app update allowing app service plan to be set.
* @param <FluentT> the type of the resource, either a web app or a deployment slot
*/
interface WithAppServicePlan<FluentT> {
/**
* Creates a new free app service plan to use. No custom domains or SSL bindings are available in this plan.
* @return the next stage of web app update
*/
Update<FluentT> withNewFreeAppServicePlan();

/**
* Creates a new app service plan to use.
* @param name the name of the app service plan
* @param pricingTier the pricing tier to use
* @return the next stage of web app update
*/
Update<FluentT> withNewAppServicePlan(String name, AppServicePricingTier pricingTier);

/**
* Uses an existing app service plan for the web app.
* @param appServicePlanName the name of the existing app service plan
* @return the next stage of web app update
*/
Update<FluentT> withExistingAppServicePlan(String appServicePlanName);
}

/**
* The stage of the web app update allowing host name binding to be set.
* @param <FluentT> the type of the resource, either a web app or a deployment slot
Expand Down Expand Up @@ -946,14 +908,31 @@ interface WithConnectionString<FluentT> {
*/
Update<FluentT> withConnectionStringStickiness(String name, boolean sticky);
}

/**
* A web app update stage allowing source control to be set.
* @param <FluentT> the type of the resource, either a web app or a deployment slot
*/
interface WithSourceControl<FluentT> {
/**
* Starts the definition of a new source control.
* @return the first stage of a source control definition
*/
WebAppSourceControl.UpdateDefinitionStages.Blank<Update<FluentT>> defineSourceControl();

/**
* Removes source control for deployment from the web app.
* @return the next stage of the web app update
*/
Update<FluentT> withoutSourceControl();
}
}

/**
* The template for a web app update operation, containing all the settings that can be modified.
*/
interface Update<FluentT> extends
Appliable<FluentT>,
UpdateStages.WithAppServicePlan<FluentT>,
UpdateStages.WithHostNameBinding<FluentT>,
UpdateStages.WithHostNameSslBinding<FluentT>,
UpdateStages.WithClientAffinityEnabled<FluentT>,
Expand All @@ -962,6 +941,7 @@ interface Update<FluentT> extends
UpdateStages.WithSiteEnabled<FluentT>,
UpdateStages.WithSiteConfigs<FluentT>,
UpdateStages.WithAppSettings<FluentT>,
UpdateStages.WithConnectionString<FluentT> {
UpdateStages.WithConnectionString<FluentT>,
UpdateStages.WithSourceControl<FluentT> {
}
}
Loading