Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update powershell scripts to support fetching publish credentials #133

Open
asalvo opened this issue Jul 14, 2022 · 0 comments
Open

Update powershell scripts to support fetching publish credentials #133

asalvo opened this issue Jul 14, 2022 · 0 comments

Comments

@asalvo
Copy link

asalvo commented Jul 14, 2022

All of our app services have default publishing credentials, so downloading the publishing profile for each is a pain. Our build scripts get the publishing creds and then use them to deploy our code, so I made a added some code to one of the install scripts and got something working.

Between the original check for "ambient" and creating the BASE64 encoded creds, I added the following block which should still support the use of the ambient (env variables).

if($Username -eq "ambient" -or $Username -eq "") {
	Write-Output "No username provided. Fetching publish crendentials from Kudu..."
	$publishProfile = (az webapp deployment list-publishing-credentials --name ${SiteName} --resource-group ${ResourceGroup} --subscription ${SubscriptionId} | ConvertFrom-Json)
	$Username = $publishProfile.publishingUserName
	$Password = $publishProfile.publishingPassword
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant