Post-Deployment Script not working
tomslickers
Posts: 40 Bronze 2
I created a simple Post-Deployment Script that creates a job, and committed it to Git using SQL Source Control. I confirmed that this is in Git in a new folder Custom Scripts/Post-Deployment.
When I run my build/deploy process, nothing happens.
I'm using Jenkins with a PowerShell script (attached) to validate the schema and create the NuGet package. This later gets pushed to Octopus where I'm using the latest Step Templates (RedGate - Create Database Release and RedGate - Deploy from Database Release). I'm running SQL Change Automation 3.1.3.3059.
When I run my build/deploy process, nothing happens.
I'm using Jenkins with a PowerShell script (attached) to validate the schema and create the NuGet package. This later gets pushed to Octopus where I'm using the latest Step Templates (RedGate - Create Database Release and RedGate - Deploy from Database Release). I'm running SQL Change Automation 3.1.3.3059.
Tagged:
Best Answer
-
Jessica R Posts: 1,319 Rose Gold 4Hi @tomslickers,
Thanks for your post and sorry to hear you're running into an issue!
I did a quick test and this was working alright on my machine. If you use the Export-DatabaseRelease cmdlet in your powershell script, it will export the release artifacts including Update.sql - this is the script that is executed on the target server to make the changes. Can you kindly take a look at the generated script to see if it includes the post deployment script?
Answers
Thanks for your reply. After I saw this I realized that although I upgraded from DLM Automation to SQL Change Automation on our build server, our PowerShell script was still running the old DLM cmdlets. Once I changes to the new versions everything started working.
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?