-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis.sh
27 lines (25 loc) · 874 Bytes
/
travis.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
set -e
if [[ -n "$CF_PASSWORD" ]]; then
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
sudo apt-get update
sudo apt-get install cf-cli
CF_APP=banking-nest-elizama
CF_USERNAME=u201618965@upc.edu.pe
CF_ORGANIZATION=u201618965@upc.edu.pe
CF_SPACE=dev
echo $CF_APP
echo $CF_USERNAME
echo $CF_PASSWORD
echo $CF_ORGANIZATION
echo $CF_SPACE
cf api https://api.us-south.cf.cloud.ibm.com
cf login -u $CF_USERNAME -p $CF_PASSWORD -o $CF_ORGANIZATION -s $CF_SPACE
cf push --no-start
cf set-env $CF_APP MYSQL_UPC_BANKING_NEST_URL $MYSQL_UPC_BANKING_NEST_URL
cf start $CF_APP
else
echo "Skip deploy to IBM Cloud Foundry because CF_PASSWORD is empty"
exit 1
fi