Post-Deployment Script not working

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.
Tagged:

Best Answer

  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi @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?

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Answers

Sign In or Register to comment.