aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTom <thomas.verin@sonarsource.com>2017-05-05 14:31:54 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-05-26 11:56:39 +0200
commit430a6a2a306abd0c99391e678b3d061979c6fb41 (patch)
tree49723a641b4ccb97a7ff5f0487b532b8358f0b63 /scripts
parent2fbb2d7a6c766e7a33fbae4811eb3de160cd1f07 (diff)
downloadsonarqube-430a6a2a306abd0c99391e678b3d061979c6fb41.tar.gz
sonarqube-430a6a2a306abd0c99391e678b3d061979c6fb41.zip
Use Trusty image on TravisCI
- environment is more stable through time (no variations of build durations) - benefit from 8Gb ramdisk - enable parallel Maven build thanks to new CPUs
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/setupRamdisk.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/setupRamdisk.sh b/scripts/setupRamdisk.sh
new file mode 100755
index 00000000000..1ac8f5b158d
--- /dev/null
+++ b/scripts/setupRamdisk.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+set -euo pipefail
+
+RED='\033[0;31m'
+NC='\033[0m' # No Color
+printf "${RED}SETUP RAMDISK${NC}\n"
+printf "${RED}disk size before build${NC}\n"
+df -h
+du -sh $HOME
+
+printf "${RED}move original home${NC}\n"
+sudo mv /home/travis /home/travis.ori
+printf "${RED}create ramdisk mount point${NC}\n"
+sudo mkdir -p /home/travis
+printf "${RED}create ramdisk${NC}\n"
+sudo mount -t tmpfs -o size=8192m tmps /home/travis
+printf "${RED}copy home to ramdisk${NC}\n"
+time sudo cp -R /home/travis.ori/. /home/travis
+printf "${RED}give permissions to travis on its home in ramdisk${NC}\n"
+sudo chown -R travis:travis /home/travis
+