Skip to content

Commit

Permalink
Upload to CDN from travis (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
olamothe committed Mar 7, 2017
1 parent 11923e1 commit 715ae9b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ cache:
before_script:
- npm install -g gulp
script:
- source read.version.sh
- echo $PACKAGE_JSON_VERSION
- npm run injectTag
- npm run build
- npm run minimize
Expand Down Expand Up @@ -58,6 +60,21 @@ deploy:
tags: true
repo: coveo/search-ui
all_branches: true
- provider: s3
access_key_id: AKIAIWWGBULVXLZH3XUQ
secret_access_key:
secure: rE1I0tkPU4n9e6bjm+eAujC1ttRTGtDjOvyYIyz/0K62n7pZ8IRAH/5AIHKrNbbGu0ImQrrz8owP/jamhk5AN9+9ISrqe/jTtid9garlnfrgQtvZJNw6jVcqj9WXycz7nFLLyArPR9oXHa7GSbwk8yjn0Ho216Xf1FNGq71Jv4sCEkwfvUwi9Hs427K6p09s/dsf/q04+hZVASc1L4CMLgTj5BBOPPP9cw7QusHYCaviyy0tCtiNq5tt+R64DfNTY4mbg3wIMp4ouyfxkKYCpVngoWBm+dFtH2p3SJnTPullvEm6HA/domQHlCzsUXles4rsBZ3/8Rb1xUteqdlthyt0+WC8vpip5gsPDwk/+GcD+bVoBPCIUbQxVjmSSuZ7heJz5aPQOg0t23u/nZ2mYdXR6xjpocaf7awtAMm1lHfvQkV0SUKMNVMH2rYEfRYuans0edleVaBTri2VSCzXwqrNd7q+LcWJdxHfibXunQ3x7eQuWaLY2rw+VKHQTdwvPKjw9eqioiTN7HEhKoZn+bYU0M3XimuE9DKo7MRWXRkFvNSAQkbFRA45/nSgh317nHuXmyelyFm/Teqqy7zZYPctJ+yJD1QRvRv2kBnev/G6p6466JMLpQVQw4JzUhU9X5hyGYaCeDROHOnRoWLngDUuN9vs1v4O7M/PSeJMsdg=
bucket: coveo-nprod-binaries
local-dir: bin
upload-dir: proda/StaticCDN/searchui/v$PACKAGE_JSON_VERSION
acl: public_read
skip_cleanup: true
on:
tags: true
repo: coveo/search-ui
all_branches: true
condition: "! $TRAVIS_TAG =~ .*beta.*"

branches:
only:
- master
Expand Down
2 changes: 1 addition & 1 deletion gulpTasks/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ gulp.task('dev', ['setup', 'prepareSass'], (done)=> {
publicPath: '/js/',
compress: true,
headers: {
'Content-Security-Policy': "script-src 'self' code.jquery.com 'unsafe-inline'"
'Content-Security-Policy': "script-src 'self' code.jquery.com static.cloud.coveo.com 'unsafe-inline'"
}
});
server.listen(8080, 'localhost', ()=> {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,4 @@
"ts-loader": "^2.0.0",
"underscore": "^1.8.3"
}
}
}
3 changes: 3 additions & 0 deletions read.version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

export PACKAGE_JSON_VERSION=`cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | sed -E 's/\.[0-9]+$//g' | xargs`

0 comments on commit 715ae9b

Please sign in to comment.