grate icon indicating copy to clipboard operation
grate copied to clipboard

Document how to get exit code in build scripts

Open jbergens opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. Our build script on Azure Devops do not stop even if Grate has a problem. I think Grate returns -1 or 1 as an exit code but it looks like "dotnet run grate" does not forward this exit code to the Powershell script that Devops is using.

Describe the solution you'd like Please add some documentation of how to make this work in the most common build system. Azure Devops for me but I assume Github actions would also be a good idea. If the solution is to not use "dotnet run" then there should be documentation showing to to do some other method and if possible add some explanation why this is useful.

Describe alternatives you've considered Just building a Grate binary and call that directly.

jbergens avatar Oct 17 '22 08:10 jbergens

In my ADO instance, I've got the grate binaries being installed via dotnet tools, and then running the grate process through the grate command via dotnet.

'grate -c'... etc.

I'm not performing my ADO tasks during the build pipelines though, instead I am handling sql migrations in the release pipelines.

jswright91 avatar Oct 24 '22 14:10 jswright91

@jbergens - could you please try if this pipeline works as expected for you?

https://github.com/erikbra/grate/blob/main/examples/AzureDevops/azure-pipelines.yml

erikbra avatar Oct 27 '22 20:10 erikbra