forked from UCLALibrary/ucla-prrla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (50 loc) · 4.18 KB
/
.travis.yml
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
dist: trusty
sudo: required
language: bash
env:
global:
- secure: "TRu8K015ngAQwE558Zrj/e0yZGNXLsWVZyswFV20FRQLUcdTypYE52uDut0u6s776TW39uceL9VxCg2T/m7+NZ0UbC+DTXnzhGDFmWJAYt55xRiDODCMFIugIsrCOqFBfnqHrn56I7RXoB3BIZ1SKmrjTCSa1M5WQ+dmUYXtcefxvrXp2bBBxmjCglSxJwz6RUiztqDk5sWnmMzIL407WGX+aERtZAUORoy2QRXnU87bvSpHY2yjbjlxFYTSVMvfOZWxojW+QKGX5VBcButYTMT6ZAc2FW+N44tGfsdvQydvjMiCDfKC2CQ37numnj6cghgARl+aTq+xrGNHNv+WZj/iaLy8D/KFbZlRh4TYgRZra8u+aPj4+BKav5/kKnuFzrXrNDA0XNxPaBjoUf4I7DS4AxaKqsneMReOkRbVso/OnyCXYCfP4DMKnQAKI6KlktKOkk0cHydciQLimglTPVBrgZvPRpLqRG8Vc9k53RFpr2uq6ug7X+L4MwyGijgwqlniEMMn8f+Btu2qAh/klfMQqJ23Q+uiEVhIZMlgG/IhiUBHV2+tD/iPNbnfei8voPTgrNxa2iO07fXBnE9F6rRURwZUuKFYroCGdViIJy+PW3JIVkUX3bHBwnbTRYp1apGUmrYkv+/f9pQfdKNo8OGqy/nWFOzW5jZ98RUzE38="
- secure: "phEkjGJYKwn28sspHH2KD8DYyDNymG+XQFwtqDVz3nUm0zECMePEjsJV0ZlSio+s1axXT5cM0gFuWYTXjFfN76FkL/3MaJXM3W30FHZ6Z0zK2LXmcrGRc9IIODeuX/pO8Ojz5a6ItePxJV4/QjNE+ENeKo8NXZg9KDKAZgYm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J6gAjdldHAQ1SkF+nGqxv2DDUrRh8gkkS/PBkQ4cqpcSpTzHPh4EeDGA73cT4Ph743eFGNAET5c7QkcEC1Wktb0zhD0g7w5gPOQLAc+A4ec8QiEQ7AY9+M58n+cI="
- secure: "flL5jaNBc1TcAS+m/tls8lN2DA+UcKdcJxkeIv1Mokyr/lcLTDqfF9t+FzCDpmjm1pVE6aM26ACUNmezN6O4jsjax1oLtRqGokBBEzSL2q5itao+Td+r/JUQyN+ZdPckoroKujUqdbzmRkn9AaNGKMqbtEya4RViDG3lhj3YT7aC6ckJYZeBuNohO/MbJWayNP2b3PjzsnTk7+OgtnrXowdpoY9KhSlXLinbUiXyGCIdbdzpmd75P6/sgmiba4fAO0QUfbT7ldvkl/FvUG0rBAVFshzarrNNDCpQ0blAUreojYZp4wiGttuEa6t5BDO1xaqg+IRudVNFt93XyJ2ahIa9huIonwSJ0pLedGTw4thfUy9Rs2lwVfPP/kmxm+eoskK2ziWKvsaJTg1yT2gmZ79lTjd2hZycZMGk+CCBWzhgUpCokRzHqnsIAGd4ayLlAz6r/+7vc/dhZh8AKVt3+V415uSF/AeDQ8+CMSrCOnX/04/N+5oxinTOOY7ZkFUdn5wdWmN0IhDainbY8HdU0JlMiIpXsEiINbWljcJ60Tc01NoiAAeE4iUTsyfME/exXvzS9EYpraX0JS3gc9yhkgW3EDNxYxpyeqWY5Vg72pkkUxEFQArIuANCjrg697bF8Y4MqMCkSG4BRqif1jB4WsKF9JC9lvV10ju6WTQx7bc="
install:
- 'curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -'
- 'sudo apt-get install -y build-essential'
- 'sudo apt-get install -y nodejs'
- 'sudo apt-get install -y python-pip'
- 'sudo pip install awscli'
- 'mkdir ~/.aws'
- 'touch ~/.aws/credentials'
- 'touch ~/.aws/config'
- 'chmod 600 ~/.aws/config'
- 'echo "[default]" >> ~/.aws/config'
- 'echo "output = json" >> ~/.aws/config'
- 'echo "region = us-west-2" >> ~/.aws/config'
- 'echo "[default]" >> ~/.aws/credentials'
- 'if [ ${TRAVIS_BRANCH} = "develop" ]; then
echo "aws_access_key_id=$TEST_AWS_ACCESS_KEY" >> ~/.aws/credentials;
echo "aws_secret_access_key=$TEST_AWS_SECRET_KEY" >> ~/.aws/credentials;
else
echo "aws_access_key_id=$PROD_AWS_ACCESS_KEY" >> ~/.aws/credentials;
echo "aws_secret_access_key=$PROD_AWS_SECRET_KEY" >> ~/.aws/credentials;
fi'
script:
- reponame=${TRAVIS_BUILD_DIR##*/}
- rootdir=${PWD}
- 'ls "${rootdir}"'
- 'cd "${rootdir}"/ucla-prrla'
- 'npm install'
- 'if [ ${TRAVIS_BRANCH} = "master" ]; then
node_modules/.bin/ng build;
aws s3 sync --delete dist/ s3://test-prl.library.ucla.edu;
else
node_modules/.bin/ng build;
aws s3 sync --delete dist/ s3://prl.library.ucla.edu;
fi'
notifications:
email:
recipients:
on_success: change
on_failure: change