add real upload script
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Jochen Welzel 2021-01-18 17:17:46 +01:00
parent 4430ec4224
commit 2fe251c036
1 changed files with 13 additions and 5 deletions

View File

@ -1,7 +1,15 @@
#!/bin/bash
pwd
echo ""
ls -la
echo ""
env
CHFILENAMES=$(git diff-tree --no-commit-id --name-only $DRONE_COMMIT)
mkdir .ssh
echo $PLUGIN_KEY > .ssh/id_rsa
chmod 600 .ssh/id_rsa
for file in $CHFILENAMES; do
if [[ $file == *"zone" ]]; then
scp $file "$PLUGIN_USER"@"$PLUGIN_HOSTS":"$PLUGIN_TARGET"/$file
ZONE = $(echo $file | sed 's/\.zone//')
ssh "PLUGIN_USER"@"$PLUGIN_HOSTS" nsd-control reload $ZONE
fi
done