.NET Core WebJob Console app CI/CD using Azure DevOps Pipelines

Build Pipeline — build the .NET Core Console app

Release Pipeline — deploy the build artifact to Azure App Service

  • resourceGroupName - Resource Group name of your application
  • scheduleName - Contentious/ Triggered. In this example it's Continuous
  • scmApiUrl - SCM Api Url. Example: https://.scm.azurewebsites.net/api
  • webJobName - your webjob name. Your code will be deployed under wwwroot\App_Data\Jobs\scheduleName\webJobName folder
  • zippedArtifactPath - zipped artifact path of your build output file
  • Add a Azure PowerShell script task
  • Select the Azure Connection type
  • Select the Azure Subscription where your WebApp is located
  • Select Script Type as Inline Script

Accessing environment specific configuration

Wrap up

  • dotnet publish with --self-contained -r win10-x64 argument. Which generates the WebJob supported EXE file.
  • Zipped the build artifact directory.
  • Used KUDU ZipDeploy API to publish the WebJob console application to the Existing Web/API App Virtual directory using Azure PowerShell Script task.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store