Skip to content

Instantly share code, notes, and snippets.

@nielsvanderkaap
Last active September 4, 2021 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nielsvanderkaap/634dc7ddc32b6797d8919d94c5dd678a to your computer and use it in GitHub Desktop.
Save nielsvanderkaap/634dc7ddc32b6797d8919d94c5dd678a to your computer and use it in GitHub Desktop.
parameters:
- name: component
type: object
steps:
- task: DotNetCoreCLI@2
displayName: Build Azure Function
inputs:
command: 'build'
projects: '$(basePath)/${{parameters.component.projectPath}}/${{parameters.component.projectName}}.csproj'
arguments: '-c Release'
- task: DotNetCoreCLI@2
displayName: Publish Azure Function ${{parameters.component.displayName}}
inputs:
command: 'publish'
publishWebProjects: false
projects: '$(basePath)/${{parameters.component.projectPath}}/${{parameters.component.projectName}}.csproj'
arguments: '-c Release'
zipAfterPublish: false
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(basePath)/${{parameters.component.projectPath}}/bin/Release/netcoreapp3.1/publish'
artifact: 'AzureFunction_${{parameters.component.name}}'
publishLocation: 'pipeline'
- task: PublishPipelineArtifact@1
displayName: Publish Function App template ${{parameters.component.displayname}}
inputs:
targetPath: '$(basePath)/${{parameters.component.templatePath}}'
artifact: 'FunctionApp_${{parameters.component.name}}'
publishLocation: 'pipeline'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment