...
Below is a sample build workflow to build a Node.js Source code archive and create an artifact from it.
...
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 Properties.
...
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: Create an archive of the source code in the intermediate dir
Per the Azure Web App deployment requirement, we have created an archive with the Node.js source code inside it.
...
To perform a build in Azure Web App backend, you just need to check the Remote Build flag under Project properties. Plugin would do all necessary configurations behind the scenes.
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.
...
As part of the above step, all files inside the artifactObjects folder are archived to create an artifacts.zip which will be saved as an artifact for future reference from the Deployment workflow.
...
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. In case 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.
...
executeWebAppSlotSwapoperation 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.
...