From b16f142c211a4bbb4a9fcb244aab5e6f8379dcfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=97=AA=D1=94=CE=BD=CE=B9=CE=B7=20=E1=97=B7=CF=85=D0=BD?= =?UTF-8?q?=CA=9F?= Date: Wed, 23 Sep 2020 09:43:31 -0400 Subject: [PATCH] Override facts when commit hash is specified --- tasks/build/download-k3s.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tasks/build/download-k3s.yml b/tasks/build/download-k3s.yml index e897d49..c8b48c8 100644 --- a/tasks/build/download-k3s.yml +++ b/tasks/build/download-k3s.yml @@ -12,6 +12,14 @@ k3s_hash_url: "{{ k3s_github_download_url }}/{{ k3s_release_version }}/sha256sum-{{ k3s_arch }}.txt" check_mode: false +- name: Override k3s_binary_url and k3s_hash_url facts for testing specific commit + set_fact: + k3s_binary_url: "https://storage.googleapis.com/k3s-ci-builds/k3s{{ k3s_arch_suffix }}-{{ k3s_release_version }}" + k3s_hash_url: "https://storage.googleapis.com/k3s-ci-builds/k3s{{ k3s_arch_suffix }}-{{ k3s_release_version }}.sha256sum" + when: + - k3s_release_version | regex_search("^[a-z0-9]{40}$") + check_mode: false + - name: Ensure the k3s hashsum is downloaded uri: url: "{{ k3s_hash_url }}"