Skip to content

Latest commit

 

History

History
90 lines (63 loc) · 2.48 KB

File metadata and controls

90 lines (63 loc) · 2.48 KB

Deploy to a deployment slot

appservice/deploy-to-deployment-slot/README.md

Prerequisites

This example assumes you have previously completed the following examples:

  1. Create an Azure Resource Group
  2. Create an Azure App Service Plan
  3. Deploy a web application on a managed Tomcat
  4. Create a deployment slot

Build the example

  mvn clean install

Deploy to a deployment slot

  mvn azure-webapp:deploy \
    -DappName=$APPSERVICE_TOMCAT_HELLOWORLD \
    -DappServicePlan=$APPSERVICE_PLAN \
    -DresourceGroup=$RESOURCE_GROUP \
    -DdeploymentSlotName=staging

Once the command completes you will be able to see the example by using your web browser and going to the xxxxx.azurewebsites.net address the command echoes.

You can also get the URL by using the following command:

  az webapp deployment slot list \
    --resource-group $RESOURCE_GROUP \
    --name $APPSERVICE_TOMCAT_HELLOWORLD \
    --output tsv \
    --query '[0].defaultHostName'

Cleanup

Do NOT forget to remove the resources once you are done running the example.

1m