diff --git a/changes.md b/changes.md index 3ca8b04f0..a34affcad 100644 --- a/changes.md +++ b/changes.md @@ -16,6 +16,8 @@ - Update maven 3.2.5 to 3.3.1 (Hiro Asari) +- Install PhantomJS 2.0.0 from custom-built archive in /usr/local/phantomjs-2.0.0/bin/phantomjs (Hiro Asari) + ### Production on 2015-02-03: - Update sbt-extras script to fix travis-ci/travis-ci#3140 (Gilles Cornu) diff --git a/ci_environment/phantomjs/recipes/2.0.rb b/ci_environment/phantomjs/recipes/2.0.rb new file mode 100644 index 000000000..7b908e286 --- /dev/null +++ b/ci_environment/phantomjs/recipes/2.0.rb @@ -0,0 +1,25 @@ +# Install PhantomJS 2.0.0 from custom-built archive + +package 'libjpeg-dev' +package 'libicu48' + +archive_path = File.join(Chef::Config[:file_cache_path], 'phantomjs.tar.bz2') +version = '2.0.0' +local_dir = "/usr/local/phantomjs-#{version}/bin" + +remote_file archive_path do + source "https://s3.amazonaws.com/travis-phantomjs/phantomjs-#{version}-#{node.platform}-#{node.platform_version}.tar.bz2" +end + +directory local_dir do + user 'root' + group 'root' + recursive true +end + +bash "expand phantomjs archive" do + user 'root' + group 'root' + code "tar xjf #{archive_path} -C #{local_dir}" + creates File.join(local_dir, 'phantomjs') +end \ No newline at end of file diff --git a/vm_templates/common/standard.yml b/vm_templates/common/standard.yml index 01fd09637..9aaf4f0b7 100644 --- a/vm_templates/common/standard.yml +++ b/vm_templates/common/standard.yml @@ -106,6 +106,7 @@ recipes: - firefox::tarball - chromium - phantomjs::tarball + - phantomjs::2.0 # # Debugging & support #