Skip to content

Instantly share code, notes, and snippets.

@gavincampbell
Created April 4, 2017 23:54
Show Gist options
  • Save gavincampbell/e3dfa25abf427752e919eb2110f03852 to your computer and use it in GitHub Desktop.
Save gavincampbell/e3dfa25abf427752e919eb2110f03852 to your computer and use it in GitHub Desktop.
node {
stage('git checkout'){
git 'file:///C:/Projects/Chinook.JenkinsDemo'
}
stage('Build Dacpac from SQLProj'){
bat "\"${tool name: 'Default', type: 'msbuild'}\" /p:Configuration=Release"
stash includes: 'Chinook.JenkinsDemo\\bin\\Release\\Chinook.JenkinsDemo.dacpac', name: 'theDacpac'
}
stage('Deploy Dacpac to SQL Server')
{
unstash 'theDacpac'
bat "\"C:\\Program Files (x86)\\Microsoft SQL Server\\130\\DAC\\bin\\sqlpackage.exe\" /Action:Publish /SourceFile:\"Chinook.JenkinsDemo\\bin\\Release\\Chinook.JenkinsDemo.dacpac\" /TargetServerName:(local) /TargetDatabaseName:Chinook"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment