Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.13k stars 3.77k forks source link

Error in the "Get publish profile" #23860

Open KiranKumarGowda opened 6 months ago

KiranKumarGowda commented 6 months ago

Description

Run azure/arm-deploy@v1 with: subscriptionId: a4bd6d8e-cfd8-43c2-a63c-83a8c0ff91f1 template: ./ARMTemplates/LA_Standard_Basic.json parameters: ./ARMTemplates/LA_Standard_Basic_Param.json failOnStdErr: true env: AZURE_HTTP_USER_AGENT: AZUREPS_HOSTENVIRONMENT: Changing subscription context... Error: ResourceGroup name must be set.Validating inputs Module Az latest installed from hostedAgentFolder Initializing Az Module /usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command Test-Path (Join-Path /opt/hostedtoolcache az) /usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command $env:PSModulePath /home/runner/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7-lts/Modules /usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command try * $ErrorActionPreference = "Stop" $WarningPreference = "SilentlyContinue" $output = @ $data = Get-Module -Name Az -ListAvailable | Sort-Object Version -Descending | Select-Object -First 1 $output['AzVersion'] = $data.Version.ToString() $output['Success'] = "true"

catch *** $output['Error'] = $_.exception.Message

return ConvertTo-Json $output False

"AzVersion": "11.0.0", "Success": "true"

/usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command $env:PSModulePath /opt/hostedtoolcache:/home/runner/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7-lts/Modules Initializing Az Module Complete Running Az PowerShell Script /usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command /runner/_work/_temp/55f78cfc-2e34-4a20-a190-5f80419ff698.ps1 Get-AzWebAppPublishingProfile: /runner/_work/_temp/55f78cfc-2e34-4a20-a190-5f80419ff698.ps1:2 Line | 2 | $profile = Get-AzWebAppPublishingProfile ` | ~~~~~~~ | Operation returned an invalid status code 'NotFound'

Error: Error: The process '/usr/bin/pwsh' failed with exit code 1

Can anyone help me out this.

Issue script & Debug output

$profile = Get-AzWebAppPublishingProfile `
    -ResourceGroupName ${{github.event.inputs.ResourceGroupName}} `
    -Name ${{github.event.inputs.LogicAppName}}
$profile = $profile.Replace("`r", "").Replace("`n", "")
Write-Output "::set-output name=profile::$profile"

Environment data

PS> Version

Module versions

ps> Get-Module Az

Error output

$profile = Get-AzWebAppPublishingProfile `
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Operation returned an invalid status code 'NotFound'

Error: Error: The process '/usr/bin/pwsh' failed with exit code 1
microsoft-github-policy-service[bot] commented 6 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @antcp, @AzureAppServiceCLI.