Uh oh!
There was an error while loading. Please reload this page.
Create webapp from arm template automatically - #285
Create webapp from arm template automatically#285Erik Parmann (epa095) wants to merge 9 commits into
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Jenny So (j-so)
left a comment
There was a problem hiding this comment.
Requesting change to use the CLI instead of ARM template to get credentials - thanks!
c613871 to
107c83dCompareErik Parmann (epa095)
commented
Jul 8, 2020
I rebased, ported to the new CI/CD setup, and use AZ cli instead of ARM to get username/password. |
| echo "##vso[task.setvariable variable=IMAGE_LOCATION]$IMAGE_LOCATION" | ||
| echo $IMAGE_LOCATION > image_location.txt | ||
| IMAGE_TAGGED="$(sed 's/@sha256.*/:latest/g' image_location.txt)" | ||
| echo "##vso[task.setvariable variable=IMAGE_TAGGED]$IMAGE_TAGGED" |
There was a problem hiding this comment.
Why the need for this additional environment variable? Can we reuse the image location variable?
João Pedro Martins (lokijota)
commented
Dec 14, 2021
Have added additional instructions to the WebApp deployment part to detail required steps, until this is checked/automated. As mentioned, the image has to be created before the webapp can be created. |
This PR adds the ability to create the azure web app automatically from an ARM template (#275), so one does not have to do those manual steps. There are two points worth mentioning:
It seems like the azure web app must have an actual docker image available when it is created (with docker support), so instead of deploying the web app in the environment-setup pipeline, we have to set it up in the normal pipeline, after the docker image is pushed to the ACR. This should not be much of a problem, but there can be problems if you have policies in your tenant which automatically sets some properties (i.e. ftps only).
EDIT: This has now been changed to use AZ CLI instead. To get the password from the ACI I had to resort to quite an ugly hack. I tried to have the following in
webapp-env.json, but it just did not work (authentication error).If instead I entered the password directly it worked. And if I put that exact line in the "outputs" section in printed the password fine. It might have something to do with evaluation order of the function
listCredentials, IDK. So instead I had to create another ARM script which got the credentials, passed them as an output and then this output got used by the main ARM template as a parameter. 🤦This closes#275