Skip to content

Commit

Permalink
Configure CI bits to not use CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaser committed Dec 11, 2024
1 parent de71ddf commit 1d983ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion zuul.d/playbooks/common/configure-buildset-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
- name: Replace the registry in image manifest
ansible.builtin.replace:
path: "{{ zuul.project.src_dir }}/roles/defaults/vars/main.yml"
regexp: "{{ repo }}:"
regexp: "{{ repo.replace('harbor.atmosphere.dev', 'registry.atmosphere.dev') }}"
replace: '{{ buildset_registry.host }}:{{ buildset_registry.port }}/{{ repo }}:'
loop: "{{ zuul.artifacts | default([]) }}"
loop_control:
Expand Down
8 changes: 7 additions & 1 deletion zuul.d/playbooks/common/switch-to-atmosphere-mirror.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
- name: Switch to Atmosphere image mirror
hosts: all
tasks:
- name: Switch all images out of the CDN
ansible.builtin.replace:
path: "{{ zuul.project.src_dir }}/roles/defaults/vars/main.yml"
regexp: 'registry.atmosphere.dev'
replace: 'harbor.atmosphere.dev'

# TODO(mnaser): Drop this when we can use https://github.com/vexxhost/atmosphere/pull/977
- name: Prefix all images for the job to point to mirror
ansible.builtin.shell: |
sed -i '/registry.atmosphere.dev/!s/ \(.*\): \(.*\)$/ \1: registry.atmosphere.dev\/\2/' roles/defaults/vars/main.yml
sed -i '/harbor.atmosphere.dev/!s/ \(.*\): \(.*\)$/ \1: harbor.atmosphere.dev\/\2/' roles/defaults/vars/main.yml
args:
chdir: "{{ zuul.project.src_dir }}"

Expand Down

0 comments on commit 1d983ae

Please sign in to comment.