You can trigger WebJob through REST API (Kudu).
param(
[Parameter(Mandatory=$true)]
[string]$websiteName,
[Parameter(Mandatory=$true)]
[string]$webjobName
)
$website = Get-AzureWebsite $websiteName
$publishingUsername = $website.PublishingUsername
$publishingPassword = $website.PublishingPassword
$base64AuthInfo = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $publishingUsername, $publishingPassword)))
write-host Attempting to trigger backup job;
Invoke-RestMethod -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -Uri https://$websiteName.scm.azurewebsites.net/api/jobs/triggered/$webjobName/run -Method Post -ContentType application/json
#wait for webjob to complete - you may have a nicer way to know the webjob has completed
Start-Sleep -Seconds 5
More information, you can refer to this article: How to remotely trigger an Azure web job
Steps to run PowerShell during the build/release
Add Azure PowerShell step/task to build/release definition
Select Azure Classic
Select Subscription
Select PowerShell Script file path
Specify arguments