-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
272ffec
commit 83e3905
Showing
12 changed files
with
384 additions
and
38 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
# fail if trying to reference a variable that is not set. | ||
set -u | ||
# exit immediately if a command fails | ||
set -e | ||
# echo commands | ||
set -x | ||
|
||
function cleanup { | ||
sh ./delete-resource-group.sh | ||
} | ||
|
||
export RESOURCE_GROUP_NAME="citusbot_valgrind_test_resource_group" | ||
|
||
trap cleanup EXIT | ||
|
||
public_ip=$(az group deployment show -g ${RESOURCE_GROUP_NAME} -n azuredeploy --query properties.outputs.publicIP.value) | ||
# remove the quotes | ||
public_ip=$(echo ${public_ip} | cut -d "\"" -f 2) | ||
|
||
echo ${public_ip} | ||
|
||
ssh-keyscan -H ${public_ip} >> ~/.ssh/known_hosts | ||
chmod 600 ~/.ssh/known_hosts | ||
|
||
sh ./delete-security-rule.sh | ||
|
||
echo "adding public ip to known hosts in remote" | ||
ssh -o "StrictHostKeyChecking no" -A pguser@${public_ip} "ssh-keyscan -H ${public_ip} >> /home/pguser/.ssh/known_hosts" | ||
echo "running tests in remote" | ||
|
||
# ssh with non-interactive mode does not source bash profile, so we will need to do it ourselves here. | ||
# put an empty success file for valgrind tests under results dir if there are error logs | ||
# push the files under results dir | ||
ssh -o "StrictHostKeyChecking no" -A pguser@${public_ip} \ | ||
"source ~/.bash_profile;" \ | ||
"sh /home/pguser/test-automation/azure/push-results.sh ${RESOURCE_GROUP_NAME}"; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
# this scripts pushes the results under results/ directory to release-test-results repository | ||
|
||
# args # | ||
# $1 -> branch name to push results | ||
|
||
# fail if trying to reference a variable that is not set. | ||
set -u | ||
# exit immediately if a command fails | ||
set -e | ||
# fail in a pipeline if any of the commands fails | ||
set -o pipefail | ||
|
||
branch_name=$1 | ||
|
||
# add github to known hosts | ||
|
||
echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==" >> ~/.ssh/known_hosts | ||
|
||
git clone git@github.com:citusdata/release-test-results.git "${HOME}"/release-test-results | ||
|
||
git config --global user.email "citus-bot@microsoft.com" | ||
git config --global user.name "citus bot" | ||
|
||
now=$(date +"%m_%d_%Y_%s") | ||
|
||
mv "${HOME}"/results "${HOME}"/release-test-results/periodic_job_results/"${now}" | ||
|
||
cd "${HOME}"/release-test-results | ||
|
||
commit_message="add test results" | ||
|
||
git checkout -b "${branch_name}/${now}" | ||
git add -A | ||
git commit -m "$commit_message" | ||
git push origin "${branch_name}/${now}" |
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
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
Oops, something went wrong.