This file contains 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
DATABASE_HOST="DATABASE_HOST" | |
DATABASE_USERNAME="DATABASE_USERNAME" | |
PGPASSWORD="PASSWORD" | |
DATABASE_NAME="DATABASE_NAME" | |
EC2_HOST="USER@EC2_HOST" | |
DOWNLOAD_FOLDER="/home/user/Downloads" | |
ssh -i "keypair.pem" $EC2_HOST PGPASSWORD=$PGPASSWORD pg_dump -h $DATABASE_HOST -U $DATABASE_USERNAME -f dump.sql $DATABASE_NAME | |
if [ $? -ne 0 ]; then | |
echo "There was an issue connecting to the EC2 host or database" |
This file contains 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
commit = sh(returnStdout: true, script: 'git log -1 --oneline').trim() | |
String commitMsg = "" | |
List commitMsgPre = commit.split(" ") | |
for(int i=1; i<commitMsgPre.size(); i++){ | |
commitMsg += commitMsgPre.getAt(i) + " " | |
} |