Skip to content

Commit

Permalink
Install kind (and pre-pull the latest node image), Chrome and ChromeD…
Browse files Browse the repository at this point in the history
…river (#20)

* Install kind and pre-pull the node container image

* Install Chrome and ChromeDriver

* Do not pre-create a kind cluster to fetch the latest node image
  • Loading branch information
edigaryev authored Feb 28, 2024
1 parent 8e312f6 commit 21cf6aa
Showing 1 changed file with 41 additions and 5 deletions.
46 changes: 41 additions & 5 deletions customizations/linux-runner/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,19 @@
apt:
name: jq

# Not installing kind because it has no .deb/Snap package(s)[1]
#
# [1]: https://kind.sigs.k8s.io/docs/user/quick-start/#installing-with-a-package-manager
- name: install kind
get_url:
url: https://github.com/kubernetes-sigs/kind/releases/latest/download/kind-linux-arm64
dest: /usr/local/bin/kind
mode: a+x
when: ansible_architecture == "aarch64"

- name: install kind
get_url:
url: https://github.com/kubernetes-sigs/kind/releases/latest/download/kind-linux-amd64
dest: /usr/local/bin/kind
mode: a+x
when: ansible_architecture == "x86_64"

- name: install kubectl
snap:
Expand Down Expand Up @@ -516,7 +526,33 @@
#
# [1]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#browsers-and-drivers

# Not installing anything Browser and Driver-related.
- name: fetch the latest Chrome and ChromeDriver download URLs
uri:
url: https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json
return_content: yes
register: chromelabs_json
when: ansible_architecture == "x86_64"

- name: install Chrome
unarchive:
src: "{{ chromelabs_json.json | community.general.json_query('channels.Stable.downloads.chrome[?platform==`linux64`].url | [0]') }}"
remote_src: yes
dest: /opt
when: ansible_architecture == "x86_64"

- name: install ChromeDriver
unarchive:
src: "{{ chromelabs_json.json | community.general.json_query('channels.Stable.downloads.chromedriver[?platform==`linux64`].url | [0]') }}"
remote_src: yes
dest: /opt
when: ansible_architecture == "x86_64"

- copy:
content: |
export PATH="$PATH:/opt/chrome-linux64:/opt/chromedriver-linux64"
dest: /etc/profile.d/cirruslabs-chrome.sh
mode: a+x
when: ansible_architecture == "x86_64"

# .NET Tools[1]
#
Expand Down Expand Up @@ -569,7 +605,7 @@
export PATH="$PATH:/opt/android-sdk/cmdline-tools/latest/bin:/opt/android-sdk/platform-tools:/opt/android-sdk/emulator"
export ANDROID_HOME="/opt/android-sdk"
export ANDROID_SDK_ROOT="$ANDROID_HOME"
dest: /etc/profile.d/cirruslabs.sh
dest: /etc/profile.d/cirruslabs-android.sh
mode: a+x

- file:
Expand Down

0 comments on commit 21cf6aa

Please sign in to comment.