Add template for including Chrome and ChromeDriver

Add template for including Chrome and ChromeDriver

From 26a195e8b30205e22e5a1f26d6d4cad93d70a114 Mon Sep 17 00:00:00 2001
From: Gerhard Schlager <mail@gerhard-schlager.at>
Date: Wed, 31 Oct 2018 00:48:58 +0100
Subject: [PATCH] Add template for including Chrome and ChromeDriver


diff --git a/templates/import/chrome-dep.yml b/templates/import/chrome-dep.yml
new file mode 100644
index 0000000..ca9bac3
--- /dev/null
+++ b/templates/import/chrome-dep.yml
@@ -0,0 +1,12 @@
+# This template installs Chrome and ChromeDriver for imports
+
+hooks:
+  after_bundle_exec:
+  - exec:
+      cd: /tmp
+      cmd:
+      - curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
+      - echo "deb [arch=amd64]  http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
+      - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y unzip google-chrome-stable
+      - LATEST_VERSION=$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE) && wget https://chromedriver.storage.googleapis.com/$LATEST_VERSION/chromedriver_linux64.zip
+      - unzip chromedriver_linux64.zip -d /usr/local/bin

GitHub

2 Likes