What are the challenges you face when working across database platforms? Take the survey
Options

Problems deploying database using Azure DevOps

Hi there,

I'm having some trouble which I think is related to this question: https://forum.red-gate.com/discussion/85171/need-to-run-post-deployment-script-without-schema-change#latest.

I'm using Azure DevOps to build both my MVC Web Project and Database assets in a single build pipline.  I'm using the 
"Redgate SQL Change Automation: Build" task with the "Build a SQL Change Automation project" operation.  My change automation 3 project contains a post deployment script that should always execute with our release.  The problem I have is that the build fails and it appears to be caused by a lack of schema change.  If I perform an actual change it runs through fine.

Can you confirm this is the case?  Is there a workaround that doesn't involve creating an arbitrary non-impactful migration change or object change?

The logs show:
2019-05-08T10:50:21.0382950Z ##[error]RedGate.Versioning.Automation.Shared.Errors.TerminatingException: Schema validation failed: 
2019-05-08T10:50:21.0383471Z    at RedGate.Versioning.Automation.MsBuild.MsBuildTaskRunner.PerformBuild(String projectPath, IDictionary`2 globalProperties)
2019-05-08T10:50:21.0383708Z    at RedGate.Versioning.Automation.Compare.Projects.ScaProjectBuilder.Build(ScaProjectPath scaProject, IDatabase database)
2019-05-08T10:50:21.0383801Z    at RedGate.Versioning.Automation.Compare.SchemaValidation.DiskBackedProjectValidator.ValidateProject(IProjectPath projectPath, IDatabase database, CreateDatabaseParameters createDatabaseParameters)
2019-05-08T10:50:21.0383918Z    at RedGate.Versioning.Automation.Compare.SchemaValidation.ProjectValidator.ValidateProject(String projectPath, CreateDatabaseParameters createDatabaseParameters)
2019-05-08T10:50:21.0383988Z    at RedGate.Versioning.Automation.PowerShell.Commands.InvokeDatabaseBuildCommandImpl.Process()
2019-05-08T10:50:21.0384067Z    at RedGate.Versioning.Automation.PowerShell.DlmAutomationCommandImpl`1.ProcessRecord()
2019-05-08T10:50:21.0384136Z    at RedGate.PowerShell.CommandBase`2.DelegateTo(Action doImplementation)
2019-05-08T10:50:21.0870901Z ##[error]Unable to process command '##vso[artifact.upload artifactname=Database Build Artifact;containerfolder=Database Build Artifact;]C:\agent\_work\67\s\[my database].1.0.0.244.nupkg' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296)
2019-05-08T10:50:21.0875905Z ##[error]Path not exist: C:\agent\_work\67\s\[my database].1.0.0.244.nupkg
2019-05-08T10:50:21.5931112Z ##[error]PowerShell script completed with 1 errors.
2019-05-08T10:50:21.5962558Z ##[section]Finishing: Build SQL Change Automation Project [my database]
Tagged:

Answers

  • Options
    Sergio RSergio R Posts: 610 Rose Gold 5
    We are currently investigating this issue
    Sergio
    Product Support Engineer
    Redgate Software Ltd
    Please see our Help Center for detailed guides on how to use our tools
  • Options
    Sergio RSergio R Posts: 610 Rose Gold 5
    This seems to happen when interacting with a third party extension and it appears to be intermittent
    Sergio
    Product Support Engineer
    Redgate Software Ltd
    Please see our Help Center for detailed guides on how to use our tools
  • Options
    MarkDavisMarkDavis Posts: 6 Bronze 1

    Hi @Sergio R I am also experiencing this issue. Interesting factor, if I use an hosted agent it works fine. but hosted is not really an option as my NSG in Azure would need a lot of scope to know which MS originating IP. Using my own dedicated agent causes this issue after cloning the project. Could you please advise your finding and how I can get around this issue.


Sign In or Register to comment.