0

CICD Process with Jenkins, Bitbucket, SSDT(SQL Server Data Tools).

Please list out the steps to perform CICD Process.

Including what plugins i need to install in Jenkins for SSDT(SSIS-ISPAC file) or SQL Database Solution(DAPAC file)

user1810575
  • 823
  • 3
  • 24
  • 45

1 Answers1

0

This question is very broad and as with all the stuff related to databases the best answer would be "it depends". As far as I know that there is no proper plugins either for Jenkins nor for Bitbucket that work with SSDT very well so you'll need to implement all your actions by yourself. It will depend on your system how the pipeline should look like. There are a lot of questions that you'll need to answer first but without knowing your exact situation it is very hard to suggest you something specific. Example questions:

  • How many environments do you have?
  • Do you have tests?
  • Can somebody change the state of the destination database manually, passing the CI/CD pipeline?
  • Will you run publish on every commit?
  • Do you trust what SSDT will decide how to publish database? (Mostly people would like to preview the script that would be executed on prod)

Then after answering these questions you'll might know what will you need. After that you need prepare the proper publish script, exclude/ignore/add object types you'd like to deploy and use MSBuild.exe and SQLPackage.exe command line utilities. You'll run these utilities with specific set of arguments and paths to the publish configs, DACPACs, etc. Bamboo and Jenkins supports command line commands for that.

Dmitrij Kultasev
  • 5,447
  • 5
  • 44
  • 88
  • We already have scripts or cmds to build & deploy/publish our ispac/dacpac files. Now we want to take to next level. I'm jenkins will execute the bat files. To answer your questions. 1. We have 3 enviroments DEV. UAT & PROD but currently doing a POC with one environment. 2. We won't run publish on every commit for now but we can certainly do that. 3. We're at a stage we would trust our deployment scripts to work fine. – user1810575 Jun 13 '19 at 14:25
  • All i need is from Jenkins side such as what plugins i need to install for SSIS(ISPAC) or database solutions(DAPAC) so that it works(builds/deploys) when jenkins would execute *.bat or *.sh. Do i need to download jenkins automated sever or just config the jenkins open source. Let's start there first – user1810575 Jun 13 '19 at 14:31
  • then what's the question? run SQLPackage publish via Bamboo/Jenkins. Something like "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\140\sqlpackage.exe /Action:Publish /SourceFile:$dacpacPath /Profile:$publishScriptPath" – Dmitrij Kultasev Jun 13 '19 at 17:26
  • question is how to start or what would be first step? I'm a newbie to CICD pipeline or jenkins. So i need someone to give me few step at least till installation of plugins.. from there i think i can manage. – user1810575 Jun 13 '19 at 19:17
  • first step would be to install either Jenkins or Bamboo. Then create a step that executes command line utilities. – Dmitrij Kultasev Jun 14 '19 at 09:11
  • Will start with that. – user1810575 Jun 14 '19 at 14:24