Skip to content

Commit 32845aa

Browse files
author
Power Cloud Robot
authored
Merge pull request ppc64le-cloud#58 from kishen-v/fix-bits-dl
Generate download URL based on s3 bucket.
2 parents 4735a6d + 68f2b08 commit 32845aa

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

group_vars/all

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,19 @@ bootstrap_token: abcdef.0123456789abcdef
4242
kubelet_extra_args: ""
4343

4444
# in the format of: https://dl.k8s.io/{{ directory }}/{{ build_version }}/kubernetes-client-linux-ppc64le.tar.gz
45+
# Eg: https://dl.k8s.io/ci/v1.28.0-alpha.1.48+039ae1edf5a71f/kubernetes-client-linux-ppc64le.tar.gz
4546
# used for downloading the kubernetes bits
4647
# GCS web: https://gcsweb.k8s.io/gcs/kubernetes-release-dev/ci/
4748
s3_server: dl.k8s.io
4849
directory: ci
4950
build_version: v1.20.0-alpha.0.1402+d39214ade1d60c
5051

5152
# For IBM s3 bucket:
52-
# https://s3.us-south.cloud-object-storage.appdomain.cloud/ci-builds/kubernetes/master/golang/master/d39214ade1d60c/kubernetes-client-linux-ppc64le.tar.gz
53+
# https://s3.us-south.cloud-object-storage.appdomain.cloud/{{ bucket }}/{{ directory }}/{{ build_version }}/kubernetes-client-linux-ppc64le.tar.gz
54+
# Eg: https://s3.us-south.cloud-object-storage.appdomain.cloud/ppc64le-ci-builds/kubernetes/master/golang/master/d39214ade1d60c/kubernetes-client-linux-ppc64le.tar.gz
5355
#
5456
# s3_server: s3.us-south.cloud-object-storage.appdomain.cloud
55-
# bucket: ci-builds
57+
bucket: ppc64le-ci-builds
5658
# directory: kubernetes/master/golang/master
5759
# build_version: d39214ade1d60c
5860

roles/download-k8s/tasks/main.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1+
- name: Generate download URL based on S3 server.
2+
set_fact:
3+
src_template: >-
4+
{% if s3_server == 'dl.k8s.io' -%}
5+
https://{{ s3_server }}/{{ directory }}/{{ build_version }}
6+
{%- else -%}
7+
https://{{ s3_server }}/{{ bucket }}/{{ directory }}/{{ build_version }}
8+
{%- endif %}
9+
110
- name: Extract the k8s bits
211
unarchive:
3-
src: "https://{{ s3_server }}/{{ directory }}/{{ build_version }}/{{ item }}"
12+
src: "{{ src_template }}/{{ item }}"
413
dest: "/usr/local/bin/"
514
remote_src: yes
615
extra_opts:

0 commit comments

Comments
 (0)