...
Below given is a sample build workflow to build a Java executable(war file) 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 Configuration.
...
Git Codebase
...
Exported Codebase
...
Step ii: Execute Maven Build
The below step will execute the maven build with the project pom.xml and will create a Java executable(.war) file inside the target directory.
...
note: Its essential to make sure Consumes Artifacts and Produces Artifacts checkbox is marked only when required. Please follow the snapshots for all execution steps to avoid any discrepancy.
Step iii: 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-iv: Create an archive of the executable in the intermediate dir
Per the Azure Web App deployment requirement, we have created an archive with the java executable inside it.
...
Note: the war file(or any executable files) inside the .zip file shouldn’t be inside any subfolder. Else once the zip file is deployed to Azure Web App, it may not work.
Step-v: 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 WebApp 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.
...
Select Topology from the menu and then select Topology Overview from the left menu. You will see a table that has Instances as the rows and Environments as the columns with colored circles representing the Environment Instance. Color coding represents:
...
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.
...