microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.47k stars 2.6k forks source link

[enhancement]: #19091

Open 95josh opened 11 months ago

95josh commented 11 months ago

Task name

Adding PHP 8.2 to Runtime stack dropdown for Azure App Service deploy task

Describe your feature request here

Hello all,

I have noticed that the Azure App Service deploy task's runtime stack dropdown list does not contain PHP 8.2. (I am deploying to a Web App on Linux)

image

App Service currently supports PHP 8.2.

image

Do you think this item can be added to the runtime stack dropdown list? I'd like to be able to upgrade to a newer version of PHP and still utilize this task.

Note: PHP 8.1's availability is set to be phased out of Azure App Service in September 25th, 2023, and I will need a viable upgrade option at least by then. :)

Thanks!

v-mohithgc commented 11 months ago

Hi @95josh thanks for reporting! We are working on more prioritized issues at the moment, but will get back to this one soon.

95josh commented 10 months ago

Hello all, 8.1 is going to be depreciated in aprox. 11 days.

95josh commented 10 months ago

If there is anyone else looking for a temporary workaround, you can add a Azure CLI task to your flows with the following command: (replace values inbetween <> with your own values)

az webapp config set -g <resource-group> -n <app-service-name> -s <slot name> --linux-fx-version '"PHP|8.2"'

Remove the -s option if you are not deploying to a slot, or are deploying to the production slot.

bordesujay commented 7 months ago

Any update on fixing this?

95josh commented 7 months ago

Any update on fixing this?

@bordesujay I haven't gotten any updates. My workaround still does the job though, albeit a minute or so slower.

CodeLuca commented 6 months ago

This is a major issue at my organisation, and causing us tons of headache.

@95josh did you add your CLI task before or after the Deploy Azure App Service task out of curiosity, as struggling to get your solution to work

95josh commented 6 months ago

This is a major issue at my organisation, and causing us tons of headache.

@95josh did you add your CLI task before or after the Deploy Azure App Service task out of curiosity, as struggling to get your solution to work

Hello @CodeLuca,

I added the CLI task after the Deploy Azure App Service task. What this CLI task does is set the PHP version of the app service to the specified PHP version. If this CLI task is done before the Deploy Azure App Service task, then the CLI will set the PHP version to 8.2, and then the Deploy Azure App Service task will set it to a deprecated PHP version, say 8.0.

Let me know if you have any more questions.

v-mohithgc commented 6 months ago
bordesujay commented 4 months ago

@95josh With a slight change, your workaround worked for me. Thanks a ton.

For anyone still trying to figure out, I added an Azure Cli (Powershell Core) step after deployment step:

tempsnip

The following script is almost same as what Josh suggested, removed the extra single quotes around PHP|8.2, as it didn't work for me:

az webapp config set --resource-group <resource-group> --name <app-service-name> --linux-fx-version "PHP|8.2"

Hope this works for you too @CodeLuca

drmmr763 commented 1 month ago

This is definitely still an active open issue / problem.

I may have discovered a slightly different workaround. In the task you can type in the version field. I typed in the 8.2 configuration:

image

Logs from the pipeline suggest it worked:

Trying to update App Service Configuration settings. Data: {"linuxFxVersion":"PHP|8.2"

Note: It looks like it only pushes this config into the logs if a change is actually being made. So if you manually updated it, the value isn't pushed.

After deployment the app service is updated with the correct config:

image
95josh commented 1 month ago

Excellent point @drmmr763 .

I am glad that worked for you. When I originally opened this issue, I had tried that and it didn't work. I am going to have to check this out again!