Skip to content

Commit

Permalink
Add staging repositories from stagingyum.theforeman.org that come fro…
Browse files Browse the repository at this point in the history
…m Copr
  • Loading branch information
ehelms committed Oct 30, 2023
1 parent b2946fc commit 7ede2ce
Show file tree
Hide file tree
Showing 14 changed files with 137 additions and 68 deletions.
7 changes: 7 additions & 0 deletions pipelines/pulpcore/02-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
- ../vars/forklift_{{ pipeline_type }}.yml
environment:
DJANGO_SETTINGS_MODULE: pulpcore.app.settings
pre_tasks:
- when: pulpcore_staging_source != 'stagingyum'
set_fact:
pulp_pkg_repo: "http://koji.katello.org/releases/yum/pulpcore-{{ pipeline_version }}/el{{ ansible_distribution_major_version }}/$basearch/"
- when: pulpcore_staging_source == 'stagingyum'
set_fact:
pulp_pkg_repo: "https://stagingyum.theforeman.org/pulpcore/{{ pipeline_version }}/el{{ ansible_distribution_major_version }}/$basearch/"
roles:
- epel_repositories
- pulp.pulp_installer.pulp_all_services
4 changes: 2 additions & 2 deletions pipelines/vars/forklift_pulpcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ forklift_boxes:
"{{ {forklift_server_name: server_box} }}"

pulp_install_source: packages
pulp_pkg_repo: "http://koji.katello.org/releases/yum/pulpcore-{{ pipeline_version }}/el{{ ansible_distribution_major_version }}/$basearch/"
pulp_pkg_repo_gpgcheck: False
pulp_settings:
secret_key: "unsafe_default"
Expand All @@ -24,4 +23,5 @@ pulp_install_plugins: "{{ pulp_install_plugins_base | combine(pulp_install_plugi
pulp_default_admin_password: password
pulp_pkg_name_prefix_py36: "python3-"
pulp_pkg_name_prefix_py38: "{{ 'tfm-pulpcore-python3-' if pipeline_os == 'centos7' else 'python38-' }}"
pulp_pkg_name_prefix: "{{ pulp_pkg_name_prefix_py38 if pipeline_version is version('3.15', '>=') else pulp_pkg_name_prefix_py36 }}"
pulp_pkg_name_prefix_py39: "{{ 'python39-' }}"
pulp_pkg_name_prefix: "{{ pulp_pkg_name_prefix_py39 if pipeline_version is version('3.15', '>=') else pulp_pkg_name_prefix_py36 }}"
1 change: 1 addition & 0 deletions roles/foreman_client_repositories/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ foreman_client_repositories_environment: release
foreman_client_repositories_dists:
RedHat: el
Fedora: fc
foreman_client_repositories_staging_source: koji
10 changes: 10 additions & 0 deletions roles/foreman_client_repositories/tasks/_koji_staging_repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: 'Foreman {{ foreman_client_repositories_version }} Client Staging Repository'
yum_repository:
name: foreman-client-koji
description: "Foreman {{ foreman_client_repositories_version }} Client Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/foreman-client-{{ foreman_client_repositories_version }}/{{ foreman_client_repositories_dists[ansible_os_family] }}{{ ansible_distribution_major_version }}/x86_64/"
priority: '1'
gpgcheck: no
tags:
- packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: 'Foreman {{ foreman_client_repositories_version }} Client Staging Repository'
yum_repository:
name: foreman-client-staging
description: "Foreman {{ foreman_client_repositories_version }} Client Staging Repository"
baseurl: "https://stagingyum.theforeman.org/client/{{ foreman_client_repositories_version }}/{{ foreman_client_repositories_dists[ansible_os_family] }}{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages
9 changes: 2 additions & 7 deletions roles/foreman_client_repositories/tasks/staging_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@
tags:
- packages

- name: 'Foreman {{ foreman_client_repositories_version }} Client Staging Repository'
yum_repository:
name: foreman-client-koji
description: "Foreman {{ foreman_client_repositories_version }} Client Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/foreman-client-{{ foreman_client_repositories_version }}/{{ foreman_client_repositories_dists[ansible_os_family] }}{{ ansible_distribution_major_version }}/x86_64/"
priority: '1'
gpgcheck: no
- ansible.builtin.include_tasks:
file: _{{ foreman_client_repositories_staging_source }}_staging_repo.yml

- include_tasks: qpid.yml
when:
Expand Down
1 change: 1 addition & 0 deletions roles/foreman_repositories/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
foreman_repositories_version: nightly
foreman_repositories_environment: release
foreman_repositories_plugins: true
foreman_repositories_staging_source: koji
33 changes: 33 additions & 0 deletions roles/foreman_repositories/tasks/_koji_staging_repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
- name: 'Foreman {{ foreman_repositories_version }} Koji repository'
yum_repository:
name: foreman-koji
description: "Foreman {{ foreman_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/foreman-{{ foreman_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages

- name: 'Foreman {{ foreman_repositories_version }} Plugins Koji repository'
yum_repository:
name: foreman-plugins-koji
state: "{{ foreman_repositories_plugins | ternary('present', 'absent') }}"
description: "Foreman Plugins {{ foreman_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/foreman-plugins-{{ foreman_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages

- name: 'Set module_hotfixes=1'
lineinfile:
path: "/etc/yum.repos.d/{{ item }}.repo"
line: module_hotfixes=1
loop:
- foreman-koji
- foreman-plugins-koji
tags:
- packages
when:
- foreman_repositories_version != 'nightly'
20 changes: 20 additions & 0 deletions roles/foreman_repositories/tasks/_stagingyum_staging_repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- name: 'Foreman {{ foreman_repositories_version }} Staging repository'
yum_repository:
name: foreman-staging
description: "Foreman {{ foreman_repositories_version }} Staging Repository"
baseurl: "https://stagingyum.theforeman.org/foreman/{{ foreman_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages

- name: 'Foreman {{ foreman_repositories_version }} Plugins Staging repository'
yum_repository:
name: foreman-plugins-staging
description: "Foreman {{ foreman_repositories_version }} Plugins Staging Repository"
baseurl: "https://stagingyum.theforeman.org/plugins/{{ foreman_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages
35 changes: 2 additions & 33 deletions roles/foreman_repositories/tasks/redhat_staging_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,8 @@
tags:
- packages

- name: 'Foreman {{ foreman_repositories_version }} Koji repository'
yum_repository:
name: foreman-koji
description: "Foreman {{ foreman_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/foreman-{{ foreman_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages

- name: 'Foreman {{ foreman_repositories_version }} Plugins Koji repository'
yum_repository:
name: foreman-plugins-koji
state: "{{ foreman_repositories_plugins | ternary('present', 'absent') }}"
description: "Foreman Plugins {{ foreman_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/foreman-plugins-{{ foreman_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages

- name: 'Set module_hotfixes=1'
lineinfile:
path: "/etc/yum.repos.d/{{ item }}.repo"
line: module_hotfixes=1
loop:
- foreman-koji
- foreman-plugins-koji
tags:
- packages
when:
- foreman_repositories_version != 'nightly'
- foreman_repositories_version is version('3.1', '<=')
- ansible.builtin.include_tasks:
file: _{{ foreman_repositories_staging_source }}_staging_repos.yml

- name: 'Enable foreman:el8 module'
command: dnf module enable -y foreman:el8
Expand Down
1 change: 1 addition & 0 deletions roles/katello_repositories/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
katello_repositories_version: nightly
katello_repositories_environment: "{{ foreman_repositories_environment | default('release') }}"
katello_repositories_pulp_release: stable
katello_repositories_staging_source: 'koji'
26 changes: 26 additions & 0 deletions roles/katello_repositories/tasks/_koji_staging_repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
- name: 'Katello {{ katello_repositories_version }} Koji repository'
yum_repository:
name: katello-koji
description: "Katello {{ katello_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/katello-{{ katello_repositories_version }}/katello/el{{ ansible_distribution_major_version }}/x86_64/"
priority: '1'
gpgcheck: no

- name: 'Candlepin Koji repository'
yum_repository:
name: candlepin-koji
description: "Candlepin {{ katello_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/katello-{{ katello_repositories_version }}/candlepin/el{{ ansible_distribution_major_version }}/x86_64/"
priority: '1'
gpgcheck: no

- name: 'Set module_hotfixes=1'
lineinfile:
path: "/etc/yum.repos.d/{{ item }}.repo"
line: module_hotfixes=1
loop:
- katello-koji
- candlepin-koji
when:
- katello_repositories_version != 'nightly'
20 changes: 20 additions & 0 deletions roles/katello_repositories/tasks/_stagingyum_staging_repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- name: 'Katello {{ katello_repositories_version }} Staging repository'
yum_repository:
name: katello-staging
description: "Katello {{ katello_repositories_version }} Staging Repository"
baseurl: "https://stagingyum.theforeman.org/katello/{{ katello_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages

- name: 'Candlepin {{ katello_repositories_version }} Staging repository'
yum_repository:
name: candlepin-staging
description: "Candlepin {{ katello_repositories_version }} Staging Repository"
baseurl: "https://stagingyum.theforeman.org/candlepin/{{ katello_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages
28 changes: 2 additions & 26 deletions roles/katello_repositories/tasks/staging_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,8 @@
name: katello-repos
state: absent

- name: 'Katello {{ katello_repositories_version }} Koji repository'
yum_repository:
name: katello-koji
description: "Katello {{ katello_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/katello-{{ katello_repositories_version }}/katello/el{{ ansible_distribution_major_version }}/x86_64/"
priority: '1'
gpgcheck: no

- name: 'Candlepin Koji repository'
yum_repository:
name: candlepin-koji
description: "Candlepin {{ katello_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/katello-{{ katello_repositories_version }}/candlepin/el{{ ansible_distribution_major_version }}/x86_64/"
priority: '1'
gpgcheck: no

- name: 'Set module_hotfixes=1'
lineinfile:
path: "/etc/yum.repos.d/{{ item }}.repo"
line: module_hotfixes=1
loop:
- katello-koji
- candlepin-koji
when:
- katello_repositories_version != 'nightly'
- katello_repositories_version is version('4.2', '<=')
- ansible.builtin.include_tasks:
file: _{{ katello_repositories_staging_source }}_staging_repos.yml

- name: 'Enable katello:el8 module'
command: dnf module enable -y katello:el8
Expand Down

0 comments on commit 7ede2ce

Please sign in to comment.