From 0bf80735a7af340e1dd55fcf2936f897171a9acd Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 8 Dec 2021 15:16:42 +1100 Subject: [PATCH] Use OpenDev mirrors for 8-stream CI builds Change-Id: Ief335cf80fb5d796f6c31f6956e9bc5f790eca93 --- .../8-aarch64-build-succeeds/element-deps | 1 + .../8-stream-aarch64-build-succeeds/element-deps | 1 + roles/dib-setup-gate-mirrors/tasks/main.yaml | 16 ++++++++++++++++ .../centos-minimal/8-stream/appstream.repo.j2 | 5 +++++ .../centos-minimal/8-stream/base.repo.j2 | 5 +++++ 5 files changed, 28 insertions(+) create mode 100644 roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/appstream.repo.j2 create mode 100644 roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/base.repo.j2 diff --git a/diskimage_builder/elements/centos-minimal/test-elements/8-aarch64-build-succeeds/element-deps b/diskimage_builder/elements/centos-minimal/test-elements/8-aarch64-build-succeeds/element-deps index 6374231dd..99857b0c1 100644 --- a/diskimage_builder/elements/centos-minimal/test-elements/8-aarch64-build-succeeds/element-deps +++ b/diskimage_builder/elements/centos-minimal/test-elements/8-aarch64-build-succeeds/element-deps @@ -1,2 +1,3 @@ block-device-efi +openstack-ci-mirrors vm diff --git a/diskimage_builder/elements/centos-minimal/test-elements/8-stream-aarch64-build-succeeds/element-deps b/diskimage_builder/elements/centos-minimal/test-elements/8-stream-aarch64-build-succeeds/element-deps index 6374231dd..99857b0c1 100644 --- a/diskimage_builder/elements/centos-minimal/test-elements/8-stream-aarch64-build-succeeds/element-deps +++ b/diskimage_builder/elements/centos-minimal/test-elements/8-stream-aarch64-build-succeeds/element-deps @@ -1,2 +1,3 @@ block-device-efi +openstack-ci-mirrors vm diff --git a/roles/dib-setup-gate-mirrors/tasks/main.yaml b/roles/dib-setup-gate-mirrors/tasks/main.yaml index c2c876d81..697e846e2 100644 --- a/roles/dib-setup-gate-mirrors/tasks/main.yaml +++ b/roles/dib-setup-gate-mirrors/tasks/main.yaml @@ -39,6 +39,22 @@ - appstream.repo - extras.repo +- name: Create centos-minimal 8-stream directory + file: + path: "{{ dib_gate_mirror_repos }}/centos-minimal/8-stream/yum.repos.d" + state: directory + mode: 0775 + recurse: yes + +- name: Install centos-minimal 8-stream repo files + template: + dest: "{{ dib_gate_mirror_repos }}/centos-minimal/8-stream/yum.repos.d/dib-mirror-{{ item }}" + mode: 0644 + src: "centos-minimal/8-stream/{{ item }}.j2" + with_items: + - base.repo + - appstream.repo + - name: Create centos-minimal 9-stream directory file: path: "{{ dib_gate_mirror_repos }}/centos-minimal/9-stream/yum.repos.d" diff --git a/roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/appstream.repo.j2 b/roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/appstream.repo.j2 new file mode 100644 index 000000000..a996540c7 --- /dev/null +++ b/roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/appstream.repo.j2 @@ -0,0 +1,5 @@ +[Stream-AppStream] +name=CentOS-Stream - AppStream +baseurl=https://{{ mirror_fqdn }}/centos/$releasever/AppStream/$basearch/os/ +gpgcheck=0 + diff --git a/roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/base.repo.j2 b/roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/base.repo.j2 new file mode 100644 index 000000000..bcab6d6dc --- /dev/null +++ b/roles/dib-setup-gate-mirrors/templates/centos-minimal/8-stream/base.repo.j2 @@ -0,0 +1,5 @@ +[Stream-BaseOS] +name=CentOS-Stream - Base +baseurl=https://{{ mirror_fqdn }}/centos/$releasever/BaseOS/$basearch/os/ +gpgcheck=0 +