Skip to content

Instantly share code, notes, and snippets.

@alejofv
Last active September 19, 2019 18:38
Show Gist options
  • Select an option

  • Save alejofv/4a080c945fbfbf39ecce5e7bdf84c0c2 to your computer and use it in GitHub Desktop.

Select an option

Save alejofv/4a080c945fbfbf39ecce5e7bdf84c0c2 to your computer and use it in GitHub Desktop.
Azure pipelines config file to build an Azure Functions project
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: UseDotNet@2
displayName: 'Install dotnet'
inputs:
version: '2.2.x'
packageType: sdk
- script: 'dotnet publish -c Release -o $(build.artifactstagingdirectory)/functionapp'
displayName: 'dotnet publish'
- task: ArchiveFiles@2
displayName: Archive
inputs:
archiveType: zip
rootFolderOrFile: '$(build.artifactstagingdirectory)/functionapp'
includeRootFolder: false
replaceExistingArchive: true
archiveFile: '$(build.artifactstagingdirectory)/funcapp.$(Build.BuildNumber).zip'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)/funcapp.$(Build.BuildNumber).zip'
ArtifactName: 'drop'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment