...
Navigate to Workflows and create a build and a deploy workflow using the button as highlighted below.
...
Build Workflow:
navigate to the Workflows Tab
Select the “+” button from the left-hand pane to create a new workflow with type as Build.
...
Deploy Workflow:
navigate to the Workflows Tab
Select the “+” button from the left-hand pane to create a new workflow with type as Deploy.
...
Below given is a sample build workflow to build and push the docker image and create an artifact from the Application Setting and Connection String file.
...
Step-i: Clone Git Repository
This step will clone the Git repository codebase into the project execution working directory. The Git URL will be retrieved from Source Control configured under Project Configuration.
...
Git Codebase
...
EXPORTED CODEBASE
...
Step ii: Copy the properties file to the intermediate dir
Application Setting and Connection String json files(if applicable/present) will be moved to the intermediate directory. An intermediate directory can have any name, in this case, we are using the artifactsObjects folder inside the TEMP directory. File names are mentioned under File Filter with ‘##’ separated(as advised in the description). Application Setting and Connection String values can also be passed as input to deploy workflow. Application Setting and Connection String files are optional, please review the Application Setting and Connection String property update for a detailed explanation.
...
Step-iii: Build and Push docker image to ACR
Below given is the Docker plugin(buildImage operation) configurations.
...
We have also marked the “Push Image to Repository” checkbox to ensure the created image is deployed to Docker Registry. pushImage operation under the Docker plugin can also be used to push the image to target docker registry.
...
If the Container Registry Account is properly configured it would push the image to Docker Registry. In our case, the image will be pushed to Azure Container Registry.
...
Step-iv: Save all from the intermediate dir as Artifact
Post execution of the above steps the intermediate directory(artifactObjects) should contain files as shown below.
...
First, navigate to the Workflow Definition tab and open the X2 Variables popup
Next use Create option to add four output variables.
...
Please refer to this link for the input structure of Application Setting and Connection String both when passed as a file or as input parameter - Application Setting/Connection String file and input content acceptable structure
In case both the Application Setting file and Application Setting input argument are passed, a consolidated list of properties will be considered while updating Web App. If the same attribute is used both in the file and input, the value provided as part of the input will take precedence. The same applies to Connection String as well.
...
In case someone wants to do a slot swap, they can provide the Target Slot to swap with as shown below.
...
executeWebAppSlotSwap operation can be used to perform the slot swap.
...
Best way to check logs: https://$webapp_name.scm.azurewebsites.net/api/logstream or logstream from console or https://$webapp_name.scm.azurewebsites.net/api/logs/docker
So in case the Web App Url is : https://webapp0610.azurewebsites.net
The log can be accessed at -https://webapp0610.scm.azurewebsites.net/api/logstream
or check the docker log files under https://webapp0610.scm.azurewebsites.net/api/logs/docker
In case of failure we can easily debug the issue from log. Such as in this case it’s evident that the Docker Registry credential is invalid.
...