Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 62c4522

Browse files
authored
Merge pull request #40 from Shoelace/travis_cache
Travis cache
2 parents 8c4ff86 + 9f3cb9f commit 62c4522

123 files changed

Lines changed: 40 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,28 @@ env:
1717
- ORA_SDTZ='Europe/London' #Needed as a client parameter
1818
- TZ='Europe/London' #Needed as a DB Server parameter
1919

20+
addons:
21+
apt:
22+
packages:
23+
#packages required by oracle
24+
- bc
25+
- rpm
26+
- unzip
27+
# - libaio1
28+
29+
30+
cache:
31+
directories:
32+
- .cache
33+
- $HOME/.cache
34+
35+
before_install:
36+
# On trusty, download the zip file into a cachable directory
37+
- test "$DIST" = precise || export ORACLE_ZIP_DIR=$HOME/.cache
38+
# If the zip file already exists, do not download it again
39+
- test -f "$ORACLE_ZIP_DIR"/$(basename $ORACLE_FILE) || bash .travis/oracle/download.sh
40+
2041
install:
21-
- bash .travis/oracle/download.sh
2242
- bash .travis/oracle/install.sh
2343

2444
script:

.travis/oracle/download.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
// vim: set et sw=2 ts=2:
22
"use strict";
3+
4+
var fs = require('fs');
5+
36
var env = process.env;
47
var Promise = require('bluebird');
58
var Phantom = Promise.promisifyAll(require('node-phantom-simple'));
69
var PhantomError = require('node-phantom-simple/headless_error');
710

11+
if (env['ORACLE_ZIP_DIR']) {
12+
var directory = env['ORACLE_ZIP_DIR'];
13+
if (!fs.existsSync(directory)) {
14+
fs.mkdirSync(directory);
15+
}
16+
process.chdir(directory);
17+
}
18+
819
Phantom.createAsync({ parameters: { 'ssl-protocol': 'tlsv1' } }).then(function (browser) {
920
browser = Promise.promisifyAll(browser, { suffix: 'Promise' });
1021

.travis/oracle/install.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ test -f /sbin/chkconfig ||
1818

1919
test -d /var/lock/subsys || sudo mkdir /var/lock/subsys
2020

21-
unzip -j "$(basename $ORACLE_FILE)" "*/$ORACLE_RPM"
21+
if [ "$ORACLE_ZIP_DIR" != "" ]; then
22+
ORACLE_ZIP="$ORACLE_ZIP_DIR/$(basename $ORACLE_FILE)"
23+
else
24+
ORACLE_ZIP="$(basename $ORACLE_FILE)"
25+
fi
26+
27+
unzip -j $ORACLE_ZIP "*/$ORACLE_RPM"
28+
2229
sudo rpm --install --nodeps --nopre "$ORACLE_RPM"
2330

2431
echo 'OS_AUTHENT_PREFIX=""' | sudo tee -a "$ORACLE_HOME/config/scripts/init.ora" > /dev/null
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)