Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Commit

Permalink
CSCMETAX-61: [REM] Dont deploy to test envs until 'update generated t…
Browse files Browse the repository at this point in the history
…est datasets' performance is fixed
  • Loading branch information
Hannu Kamarainen committed Jul 4, 2019
1 parent 98333e0 commit 5cbe152
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions .travis-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@ if [[ "$TRAVIS_BRANCH" == "master" || "$TRAVIS_PULL_REQUEST" != "false" ]]; then
exit 0
fi

pip install ansible
git clone https://github.com/CSCfi/metax-ops
cd metax-ops/ansible/
# pip install ansible
# git clone https://github.com/CSCfi/metax-ops
# cd metax-ops/ansible/

if [[ "$TRAVIS_BRANCH" == "test" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
echo "Deploying to test.."
ansible-galaxy -r requirements.yml install --roles-path=roles
ansible-playbook -vv -i inventories/test/hosts site_deploy.yml --extra-vars "ssh_user=metax-deploy-user server_domain_name=metax-test.csc.fi"
elif [[ "$TRAVIS_BRANCH" == "stable" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
echo "Deploying to stable.."
ansible-galaxy -r requirements.yml install --roles-path=roles
ansible-playbook -vv -i inventories/stable/hosts site_deploy.yml --extra-vars "ssh_user=metax-deploy-user server_domain_name=metax-stable.csc.fi"
fi
# if [[ "$TRAVIS_BRANCH" == "test" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
# echo "Deploying to test.."
# ansible-galaxy -r requirements.yml install --roles-path=roles
# ansible-playbook -vv -i inventories/test/hosts site_deploy.yml --extra-vars "ssh_user=metax-deploy-user server_domain_name=metax-test.csc.fi"
# elif [[ "$TRAVIS_BRANCH" == "stable" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
# echo "Deploying to stable.."
# ansible-galaxy -r requirements.yml install --roles-path=roles
# ansible-playbook -vv -i inventories/stable/hosts site_deploy.yml --extra-vars "ssh_user=metax-deploy-user server_domain_name=metax-stable.csc.fi"
# fi

# Make sure the last command to run before this part is the ansible-playbook command
if [ $? -eq 0 ]
then
exit 0
else
exit 1
fi
# # Make sure the last command to run before this part is the ansible-playbook command
# if [ $? -eq 0 ]
# then
# exit 0
# else
# exit 1
# fi
exit 0

0 comments on commit 5cbe152

Please sign in to comment.