Fix version number;Parse, Pull & Compress container images
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
18fa7742fa
commit
b7abf25907
@ -19,33 +19,26 @@
|
||||
cmd: helm fetch {{ item.value.helm_chart }} --untar --version {{ item.value.version }}
|
||||
chdir: /opt/metacluster/helm-charts
|
||||
loop: "{{ lookup('ansible.builtin.dict', components) }}"
|
||||
|
||||
- ansible.builtin.command:
|
||||
cmd: ls -lashR /opt/metacluster/helm-charts
|
||||
register: results
|
||||
- ansible.builtin.debug:
|
||||
var: results
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
- name: Parse helm charts for container images
|
||||
ansible.builtin.command:
|
||||
cmd: "{{ item.value.parse_cmd }} /opt/metacluster/helm-charts/{{ item.key }}/values.yaml"
|
||||
cmd: "{{ item.value.parse_logic }} /opt/metacluster/helm-charts/{{ item.key }}/values.yaml"
|
||||
register: containerimages
|
||||
loop: "{{ lookup('ansible.builtin.dict', components) }}"
|
||||
# loop_control:
|
||||
# label: "{{ item.key }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
- ansible.builtin.debug:
|
||||
var: containerimages
|
||||
- name: Pull and store containerimages
|
||||
ansible.builtin.command:
|
||||
cmd: skopeo copy docker://{{ item }} docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}.tar:{{ item }}
|
||||
chdir: /opt/metacluster/container-images
|
||||
loop: "{{ containerimages.results | map(attribute='stdout_lines') | flatten }}"
|
||||
|
||||
# - name: Pull and store containerimages
|
||||
# ansible.builtin.command:
|
||||
# cmd: skopeo copy docker://{{ item }} docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}.tar:{{ item }}
|
||||
# chdir: /opt/metacluster/container-images
|
||||
# loop: ...
|
||||
|
||||
# - name: Compress tarballs
|
||||
# community.general.archive:
|
||||
# dest: /opt/metacluster/container-images/{{ item | regex_findall('[^/:]+'))[-2] }}.tar.gz
|
||||
# path: /opt/metacluster/container-images/{{ item | regex_findall('[^/:]+'))[-2] }}.tar
|
||||
# remove: yes
|
||||
# loop: ...
|
||||
- name: Compress tarballs
|
||||
community.general.archive:
|
||||
dest: /opt/metacluster/container-images/{{ item | regex_findall('[^/:]+'))[-2] }}.tar.gz
|
||||
path: /opt/metacluster/container-images/{{ item | regex_findall('[^/:]+'))[-2] }}.tar
|
||||
remove: yes
|
||||
loop: "{{ containerimages.results | map(attribute='stdout_lines') | flatten }}"
|
||||
|
@ -13,10 +13,12 @@ components:
|
||||
longhorn:
|
||||
version: 1.3.0
|
||||
helm_chart: longhorn/longhorn
|
||||
parse_logic: yq e '.. | select(has("repository")) | .repository + ":" + .tag'
|
||||
|
||||
harbor:
|
||||
version: 2.5.1
|
||||
version: 1.9.1 # (= Harbor v2.5.1)
|
||||
helm_chart: harbor/harbor
|
||||
parse_logic: yq e '.. | select(has("repository")) | .repository + ":" + .tag'
|
||||
|
||||
# argocd:
|
||||
# version:
|
||||
|
Loading…
Reference in New Issue
Block a user