Added backup option in travis failure

This commit is contained in:
Ganesh Gore 2019-11-02 17:51:30 -06:00
parent 3ef978accc
commit d14be73825
2 changed files with 8 additions and 4 deletions

View File

@ -54,11 +54,12 @@ before_install:
- openssl aes-256-cbc -K $encrypted_6f6cf68308be_key -iv $encrypted_6f6cf68308be_iv -in deploy_key.enc -out ./deploy_key -d
- eval "$(ssh-agent -s)"
- chmod 600 ./deploy_key
- echo -e "Host $SERVER_IP_ADDRESS\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- ssh-add ./deploy_key
- ssh -o StrictHostKeyChecking=no -i ./deploy_key u1249762@lab1-1.eng.utah.edu pwd
- cp $TRAVIS_BUILD_DIR/deploy_key ~/.ssh/id_rsa
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- ssh u1249762@lab1-1.eng.utah.edu pwd
- ssh u1249762@lab1-1.eng.utah.edu "mkdir /var/tmp/travis_bc/$TRAVIS_JOB_ID"
- echo $TRAVIS_JOB_ID >> build_id.txt
- scp -o StrictHostKeyChecking=no -i ./deploy_key build_id.txt u1249762@lab1-1.eng.utah.edu:/var/tmp/travis_bc/build_id.txt
- scp build_id.txt u1249762@lab1-1.eng.utah.edu:/var/tmp/travis_bc/$TRAVIS_JOB_ID/
- source .travis/common.sh
install:
- DEPS_DIR="${HOME}/deps"

View File

@ -9,4 +9,7 @@ travis_fold end after_failure.1
start_section "failure.tail" "${RED}Failure output...${NC}"
tail -n 1000 output.log
echo "Failed uploading files to LNIS Server"
scp -qCr $TRAVIS_BUILD_DIR/openfpga_flow/tasks/ u1249762@lab1-1.eng.utah.edu:/var/tmp/travis_bc/$TRAVIS_JOB_ID/
scp output.log u1249762@lab1-1.eng.utah.edu:/var/tmp/travis_bc/$TRAVIS_JOB_ID/
end_section "failure.tail"