Below are the steps to create the first Release pipeline in Azure DevOps 1. Develop the code(I am using DotNetCore Web App) which you want...
Below are the steps to create the first Release pipeline in Azure DevOps
1. Develop the code(I am using DotNetCore Web App) which you want to make a part of the release pipeline.
2. Create Azure Repository.
3. Add Azure Repository into your code's Git Remote Settings.
4. Create Azure Pipeline with the below code.
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: '**/*.csproj'
arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
inputs:
command: 'publish'
publishWebProjects: true
arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)'
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: 'myapp-artifact'
5. Save and Run the pipeline.
6. Create a Web app service
7. Create a Release pipeline and select the Empty Job template.
8. Create a task and create an agent job for the WebApp service and assign the webapp which you created.
9. In the artifact add the artifact as Build and point to the Azure pipeline.
10. Create the release and after successful execution you can access web application on web app URL.
COMMENTS