diff options
-rw-r--r-- | provisioning/modules/chromedriver/manifests/init.pp | 37 | ||||
-rw-r--r-- | provisioning/modules/pixelated/manifests/source.pp | 4 |
2 files changed, 39 insertions, 2 deletions
diff --git a/provisioning/modules/chromedriver/manifests/init.pp b/provisioning/modules/chromedriver/manifests/init.pp new file mode 100644 index 00000000..d3f0a414 --- /dev/null +++ b/provisioning/modules/chromedriver/manifests/init.pp @@ -0,0 +1,37 @@ +# install chromedriver for functional tests +# we ship our local copy of chromedriver +# because latest versions are getting recurring errors on +# test/functional/features/login.feature#Then I should see the fancy interstitial + +class chromedriver ( + $release = '1.0_beta1', + $chromedriver = 'chromedriver_2.27_linux64.zip', + $google_chrome = 'google-chrome-stable_54.0.2840.100-1_amd64.deb', +) { + + exec { 'fetch_chromedriver': + command => "/usr/bin/wget https://github.com/pixelated/pixelated-user-agent/releases/download/${release}/${chromedriver}", + cwd => '/var/tmp', + creates => "/var/tmp/${chromedriver}", + } + + exec { 'fetch_google_chrome': + command => "/usr/bin/wget https://github.com/pixelated/pixelated-user-agent/releases/download/${release}/${google_chrome}", + cwd => '/var/tmp', + creates => "/var/tmp/${google_chrome}", + } + + exec { 'unpack_chromedriver': + command => "/usr/bin/unzip ${chromedriver} -d /usr/local/bin/", + cwd => '/var/tmp/', + creates => '/usr/local/bin/chromedriver', + } + + exec { 'install_google_chrome': + command => "/usr/bin/dpkg -i ${google_chrome} || /usr/bin/apt-get -y -f install", + cwd => '/var/tmp/', + unless => '/usr/bin/dpkg -l google-chrome-stable > /dev/null 2>&1', + require => [ Exec['apt_get_update'] ], + } + +} diff --git a/provisioning/modules/pixelated/manifests/source.pp b/provisioning/modules/pixelated/manifests/source.pp index de4ade1e..691a3fbc 100644 --- a/provisioning/modules/pixelated/manifests/source.pp +++ b/provisioning/modules/pixelated/manifests/source.pp @@ -1,5 +1,6 @@ # install requirements for setting up the useragent from source class pixelated::source { + include chromedriver package { [ 'git', @@ -15,14 +16,13 @@ class pixelated::source { 'ruby-compass', 'xvfb', 'xauth', - 'chromedriver', 'phantomjs' ]: ensure => latest } package { ['sass', 'compass']: - ensure => latest, + ensure => latest, provider => 'gem', } |