I saw this thread https://help.octopusdeploy.com/discussions/problems/46974-lquibase-update-success-message-coming-as-error-in-logs which is about the same issue I’m here about.
When I run a liquibase ‘update’ command, the log saying it was successful registers as an error (see log in other thread as it is the exact same).
A suggestion from the comments is to add Exit 0
to the script if it ran successfully but I’m a bit stumped on how to do that.
Here is my script (I call Liquibase commands a couple of times and I’ve removed unnecessary parts of the command):
Write-Host "2. Executing updateSql command"
java -cp "jar locations" liquibase.integration.commandline.Main --driver "com.mysql.jdbc.Driver" --changeLogFile "_schema.xml" --logLevel severe --username $LiquibaseUsername --password=$LiquibasePassword --url "jdbc:mysql://localhost:3306/$($DatabaseName)?useSSL=false" updateSql
Write-Host "3. Executing update command"
java -cp "jar locations" liquibase.integration.commandline.Main --driver "com.mysql.jdbc.Driver" --changeLogFile "_schema.xml" --logLevel severe --username $LiquibaseUsername --password=$LiquibasePassword --url "jdbc:mysql://localhost:3306/$($DatabaseName)?useSSL=false" update
If possible I’d still like the logs to show "Liquibase ‘update’ Successful, just not appear as an Error - but happy to have it return Exit 0
if that is better, just unsure how.