Closed mistyn8 closed 7 months ago
Hi
If the problem persists and is related to running it on Azure App Service, please open a support incident in Azure: https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request
This way we can better track and assist you on this case
Thanks,
Joaquin Vano Azure App Service
Thought I'd add a webhook call out to MSTeams from the deploy.cmd
call :ExecuteCmd curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"type\": \"message\", \"attachments\": [{\"contentType\": \"application/vnd.microsoft.card.adaptive\", \"content\": {\"type\": \"AdaptiveCard\", \"body\": [{\"type\": \"TextBlock\", \"size\": \"Medium\", \"weight\": \"Bolder\", \"text\": \"%ASPNETCORE_ENVIRONMENT% Environment Deployed\" }, {\"type\": \"TextBlock\", \"text\": \"%SCM_COMMIT_MESSAGE% \", \"wrap\": true } ], \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\", \"version\": \"1.5\" } } ] }" https://{XXX}.webhook.office.com/webhookb2/{GUID}/IncomingWebhook/{GUID}
However, because the git commit message contains a final linebreak, (indeed could have multiple lines and multiple line breaks), and %SCM_COMMIT_MESSAGE% just passes the raw data, I could find no way to remove/encode the commit message so that it doesn't cause a line break(s) and break the deploy.cmd? Ideally
"message line one\nmessage line two\n"
?I reverted back to using
so that linebreaks are removed from the commit message, with the added benifit of getting the abbreviated commit hash (over SCM_COMMIT_ID) and other formats as required author etc..
Maybe others would have a way to not have to fallback to
git show
?