I'm using Azure DevOps to build and release my PHP app, currently to a staging slot within an Azure WebApp instance, so that I can warm-switch it to the production slot. The process is using Azure Pipelines to build (zip) the app from the branch, this passes the build artifact to a Releases event chain which then pushes it up to the Azure instance.
I'm trying to pull the Azure DevOps Release ID and Build Number into the instance that's deployed to the Azure WebApp slot, but try as I might I can't get it to work.
What I've tried so far (bash scripts, environment variables) appears to be just setting environment variables on the agent that's doing the deployment, not on the actual Azure WebApp instance.
I've checked as much Azure DevOps and WebApp documentation as I can find, and whilst there's a few items for doing it in a Windows environment, there's not an awful lot for the Linux environment (which is what the Web App is using).
(Documentation I've already read: https://docs.microsoft.com/en-us/azure/devops/pipelines/release/variables?view=azure-devops&tabs=batch)