Created
November 12, 2017 15:16
-
-
Save MarcusFelling/1875b97b924562aab3ca1b10fd949d4c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get encrypted password from MySQL Octopus variable set | |
octopus_pwd=$(get_octopusvariable "octopus_pwd") | |
# Use the directory where the package was pushed to in the previous deploy step | |
OctopusDrop=$(get_octopusvariable "Octopus.Action[Push seed script package].Output.Octopus.Action.Package.InstallationDirectoryPath") | |
echo "Drop: $OctopusDrop" | |
echo "Updating DataWarehouse DB" | |
mysql -h localhost -u ServiceAccountName -p$octopus_pwd DataWarehouse < "$OctopusDrop/SQLScript1.sql" | |
mysql -h localhost -u ServiceAccountName -p$octopus_pwd DataWarehouse < "$OctopusDrop/SQLScript2.sql" | |
mysql -h localhost -u ServiceAccountName -p$octopus_pwd DataWarehouse < "$OctopusDrop/SQLScript3.sql" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment