Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install kind (and pre-pull the latest node image), Chrome and ChromeDriver #20

Merged
merged 3 commits into from
Feb 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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