Skip to content

Commit 3fe2733

Browse files
Merge pull request #965 from raukadah/repo_setup
Replace tripleo-repos with repo-setup
2 parents 91e7e62 + 3109a8f commit 3fe2733

File tree

2 files changed

+32
-14
lines changed

2 files changed

+32
-14
lines changed

molecule/common/Containerfile.j2

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ FROM {{ item.registry.url }}/{{ item.image }}
55
FROM {{ item.image }}
66
{% endif %}
77

8-
RUN curl -o /etc/yum.repos.d/delorean.repo https://trunk.rdoproject.org/centos9-wallaby/current/delorean.repo && \
8+
RUN curl -o /etc/yum.repos.d/delorean.repo https://trunk.rdoproject.org/centos9-master/current/delorean.repo && \
99
dnf upgrade -y && \
10-
dnf -y install sudo python3-libselinux selinux-policy {{ item.pkg_extras | default('') }} && \
11-
dnf install -y python*tripleo-repos && \
10+
dnf -y install sudo python3-libselinux selinux-policy git python3-pip {{ item.pkg_extras | default('') }} && \
11+
git clone https://github.com/openstack-k8s-operators/repo-setup && \
12+
cd repo-setup && \
13+
pip install -r requirements.txt && \
14+
python3 setup.py install && \
1215
dnf clean all -y
1316

1417
CMD [ '/sbin/init' ]

molecule/common/test_deps/tasks/main.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,18 @@
6464
state: absent
6565
keepcache: false
6666
loop:
67-
- ubi-9-appstream
68-
- ubi-9-baseos
69-
- ubi-9-codeready-builder
67+
- ubi-9-appstream-rpms
68+
- ubi-9-baseos-rpms
69+
- ubi-9-codeready-builder-rpms
7070

71-
- name: Block for tripleo-repos
71+
- name: Block for repo-setup
7272
become: true
7373
when:
7474
- (ansible_facts['os_family'] | lower) == 'redhat'
7575
block:
7676
- name: Fetch latest repo version
7777
ansible.builtin.uri:
78-
url: https://trunk.rdoproject.org/centos{{ ansible_facts['distribution_major_version'] }}/current-tripleo/delorean.repo
78+
url: https://trunk.rdoproject.org/centos{{ ansible_facts['distribution_major_version'] }}/current-podified/delorean.repo
7979
return_content: true
8080
register: edpm_packages
8181

@@ -85,21 +85,36 @@
8585
dest: /etc/yum.repos.d/delorean.repo
8686
mode: 0644
8787

88-
- name: Install tripleo-repos package
88+
- name: Install repo-setup pre-requirements
8989
become: true
9090
ansible.builtin.package:
91-
name: "python*tripleo-repos"
91+
name:
92+
- git
93+
- python3-pip
9294
state: present
9395

94-
- name: Tripleo setup block
96+
- name: Repo setup block
9597
become: true
9698
when:
9799
- (ansible_facts['os_family'] | lower) == 'redhat'
98100
- test_deps_setup_edpm | bool
99101
block:
100-
- name: Create tripleo repos
101-
ansible.builtin.command: tripleo-repos -d ubi9 {{ test_deps_setup_stream | ternary('--stream', '--no-stream', omit) }} \
102-
-b master current-tripleo {{ test_deps_setup_ceph | ternary('ceph', '', omit) }}
102+
- name: Get repo-setup repository # noqa: latest[git]
103+
ansible.builtin.git:
104+
accept_hostkey: true
105+
dest: "/tmp/repo-setup"
106+
repo: "https://github.com/openstack-k8s-operators/repo-setup"
107+
108+
- name: Install repo-setup
109+
ansible.builtin.shell: |
110+
set -eux
111+
cd /tmp/repo-setup
112+
pip install -r requirements.txt
113+
python3 setup.py install
114+
115+
- name: Create repos
116+
ansible.builtin.command: /usr/local/bin/repo-setup -d ubi9 {{ test_deps_setup_stream | ternary('--stream', '--no-stream', omit) }} \
117+
-b master current-podified {{ test_deps_setup_ceph | ternary('ceph', '', omit) }}
103118

104119
- name: Look for redhat-release rpm
105120
ansible.builtin.shell: |

0 commit comments

Comments
 (0)