Skip to content

Instantly share code, notes, and snippets.

@NenoLoje
Last active December 13, 2023 21:36
Show Gist options
  • Save NenoLoje/1ce981f2841d9955f02f1c941db04010 to your computer and use it in GitHub Desktop.
Save NenoLoje/1ce981f2841d9955f02f1c941db04010 to your computer and use it in GitHub Desktop.
Azure Pipelines: Build a SSDT Database Project (SQL Server Data Tools)
parameters:
- name: solutionFile
type: string
- name: projectName
type: string
- name: buildConfiguration
type: string
default: 'Release'
variables:
# Note: We need to replace dots with underscores ("A.B" -> "A_B") in project name
projectNameSanitized: ${{ replace(parameters.projectName, '.', '_') }}
steps:
# https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/vsbuild-v1
- task: VSBuild@1
displayName: '🏭 Build database project (SSDT)'
inputs:
solution: ${{ parameters.solutionFile }}
msbuildArgs: '/target:$(projectNameSanitized) /p:OutputPath=$(Build.StagingDirectory)'
platform: 'Any CPU'
configuration: '${{ parameters.buildConfiguration }}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment