I have an Azure WebApp to which I'm deploying to from a GitLab CICD pipeline. The application is a SOAP WebService written in Java 11, deployed as WAR, to a Free (F1) SKU on Windows.
Initially I've setup the deployment from GitHub, through the UI, and it worked perfectly, my app was deployed and I tested it from Postman, receiving the expected SOAP response, proving the application is actually up and running.
Then I moved my repo over to GitLab, and started deploying from there using a new CICD pipeline. This seemed to worked well, as I could clearly see each pipeline run as a new deployment entry as Success - and the last one as Success (Active) - in the Logs under Deployment Center, BUT the application did not seem to be actually updated with the changes. This is clear from the fact that I've updated the response object but I'm still getting the old one in Postman.
What am I missing? Is it a caching issue? Or the successful deployments are not actually true?
Note1: Additionally I also tried to setup a completely new WebApp and deploy there right away from GitLab. Here the surface behaviour seem to be the same, Logs section in the Deployment Center shows Success, but this time my app doesn't even seem to be deployed at all, as instead of my application's SOAP response I'm getting the generic "Microsoft Azure App Service - Welcome" HTML page from Azure.
Note2: In my pipeline I'm also running Ansible to inject an environment variable (APP_VERSION), which runs after the deploy job. I can see this variable being updated with each deployment under Configuration/Application settings, so clearly, the pipeline is doing what it supposed to, except the appication code itself doesn't seem to be updated somehow. See screenshots below.
So at this point it seems the deployment don't actually deploy anything somehow. Any tips please? Thank you! /András
In order for your Gitlab deployment to be successful via Deployment Center in Azure Web App, There are certain steps that you need to follow, Refer below:-
Refer my SO thread answer for deploying CI/CD successfully via Gitlab to Azure Web app.
In your Azure Web app visit to get the ssh key > https://webapp-name.scm.azurewebsites.net/api/sshkey?ensurePublicKey=1
An copy the ssh key to your Gitlab secrets like below:-
Visit your Gitlab project > Left section > Settings > Repository > Deploy keys > Expand > copy the ssh key like below
Now visit your Azure Web app Deployment Center > Select External git and copy the Gitlab java project repository clone URL and add the branch name > Save the settings and your Deployment will start like below:-
Deployment is successful like below:-
If there are any changes to be deployed in the Web app, Either you can deploy them in a separate slots or Just click on Sync
to deploy the latest changes to source control into Azure Web app like below:-
Now check if your Java files are deployed correctly in the kudu console like below:-
SSH into your Web app via Bash option and check the Deployed files like below:-
ls
cd site
ls
cd wwwroot
Also, Check your Azure Web app Log stream to see if the Files are loading properly during the startup:-