Skip to content

Commit

Permalink
Drop koji support
Browse files Browse the repository at this point in the history
Now that Foreman 3.8 is EOL, nothing is built with Koji anymore and it
can be retired. This means dropping the koji staging repositories, but
also including certain scratch builds.
  • Loading branch information
ekohl committed Mar 21, 2024
1 parent 8a04ecc commit 646d52e
Show file tree
Hide file tree
Showing 19 changed files with 34 additions and 173 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ hostmanager_ip_resolver_device: 'eth1'
Sometimes you want to spin up the same box type (e.g. centos8-katello-devel) from within the forklift directory. While this can be added to the Vagrantfile directly, updates to the forklift repository could wipe out your local changes. To help with this, you can define a custom box re-using the configuration within the Vagrantfile. To do so, create a `99-local.yaml` file in vagrant/boxes.d/. For example, to create a custom box on CentOS 8 Stream with nightly and run the installers reset command:

```yaml
my-nightly-koji:
my-nightly-staging:
box: centos8-stream
ansible:
playbook: playbooks/katello.yml
Expand Down
32 changes: 0 additions & 32 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ This covers how to setup and configure a development environment using the Forkl
* [Starting the Development Server](#starting-the-development-server)
* [Customizing the Development Environment](#customizing-the-development-environment)
* [Reviewing Pull Requests](#reviewing-pull-requests)
* [Use Koji Scratch Builds](#koji-scratch-builds)
* [Packit PR Builds](#packit-pr-builds)
* [Test Puppet Module Pull Requests](#test-puppet-module)
* [Hammer Development](#hammer-development)
Expand Down Expand Up @@ -176,37 +175,6 @@ Once reviewing is finished, the repository can be reset to develop/master branch

If `rpr` is used in project with `config/database.yml` it will also create a backup of the db in ./tmp/. When `rrpr` is called later and in case previous backup was found, it asks whether it should be restored.

## Koji Scratch Builds

Forklift supports using Koji scratch builds to make RPMs available for testing purposes. For example, if you want to test a change to nightly, with a scratch build of rubygem-katello. This is done by fetching the scratch builds, and deploying a local yum repo to the box you are deploying on. Multiple scratch builds are also supported for testing changes to multiple components at once (e.g. the installer and the rubygem), see examples below. Also, this option may be specified from within `99-local.yaml` via the `options:` option.


An Ansible role is provided that can setup and configure a Koji scratch build for testing. If you had an existing playbook such as:

```yaml
- hosts: server
roles:
- etc_hosts
- foreman_repositories
- katello_repositories
- katello
```
The Koji role and task ID variable can be added to download and configure a repository with priority:
```yaml
- hosts: server
vars:
koji_task_ids:
- 321231
roles:
- etc_hosts
- koji
- foreman_repositories
- katello_repositories
- katello
```
## Packit PR Builds

Forklift supports using Packit PR builds for testing purposes. To use those one needs to define the `packit_prs` variable to the list of PRs (in the form of `<org>/<repo>/<pr>` or as full PR links):
Expand Down
3 changes: 0 additions & 3 deletions pipelines/vars/repos_staging.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
katello_repositories_environment: staging
foreman_repositories_environment: staging
foreman_client_repositories_environment: staging
foreman_repositories_staging_source: "{{ 'stagingyum' if (pipeline_version == 'nightly' or pipeline_version is version('3.9', '>=')) else 'koji' }}"
foreman_client_repositories_staging_source: "{{ 'stagingyum' if (pipeline_version == 'nightly' or (pipeline_type == 'katello' and pipeline_version is version('4.11', '>=')) or (pipeline_type != 'katello' and pipeline_version is version('3.9', '>='))) else 'koji' }}"
katello_repositories_staging_source: "{{ 'stagingyum' if (pipeline_version == 'nightly' or pipeline_version is version('4.11', '>=')) else 'koji' }}"
1 change: 0 additions & 1 deletion roles/foreman/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ dependencies:
- role: fapolicyd
when: foreman_fapolicyd | default(false)
- role: etc_hosts
- role: koji
- role: packit
- role: foreman_server_repositories
- role: foreman_installer
1 change: 0 additions & 1 deletion roles/foreman_client_repositories/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ foreman_client_repositories_environment: release
foreman_client_repositories_dists:
RedHat: el
Fedora: fc
foreman_client_repositories_staging_source: koji

This file was deleted.

This file was deleted.

10 changes: 8 additions & 2 deletions roles/foreman_client_repositories/tasks/staging_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@
tags:
- packages

- ansible.builtin.include_tasks:
file: _{{ foreman_client_repositories_staging_source }}_staging_repo.yml
- 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/"
gpgcheck: no
tags:
- packages
1 change: 0 additions & 1 deletion roles/foreman_repositories/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
foreman_repositories_version: nightly
foreman_repositories_environment: release
foreman_repositories_plugins: true
foreman_repositories_staging_source: koji
19 changes: 0 additions & 19 deletions roles/foreman_repositories/tasks/_koji_staging_repos.yml

This file was deleted.

18 changes: 0 additions & 18 deletions roles/foreman_repositories/tasks/_stagingyum_staging_repos.yml

This file was deleted.

19 changes: 17 additions & 2 deletions roles/foreman_repositories/tasks/redhat_staging_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,23 @@
tags:
- packages

- ansible.builtin.include_tasks:
file: _{{ foreman_repositories_staging_source }}_staging_repos.yml
- 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/"
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/"
gpgcheck: no
tags:
- packages

- name: 'Enable foreman:el8 module'
command: dnf module enable -y foreman:el8
Expand Down
1 change: 0 additions & 1 deletion roles/katello_repositories/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
katello_repositories_version: nightly
katello_repositories_environment: "{{ foreman_repositories_environment | default('release') }}"
katello_repositories_staging_source: 'koji'
14 changes: 0 additions & 14 deletions roles/katello_repositories/tasks/_koji_staging_repos.yml

This file was deleted.

This file was deleted.

10 changes: 8 additions & 2 deletions roles/katello_repositories/tasks/staging_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
name: katello-repos
state: absent

- ansible.builtin.include_tasks:
file: _{{ katello_repositories_staging_source }}_staging_repos.yml
- 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/"
gpgcheck: no
tags:
- packages

- name: 'Enable katello:el8 module'
command: dnf module enable -y katello:el8
Expand Down
6 changes: 0 additions & 6 deletions roles/koji/defaults/main.yml

This file was deleted.

40 changes: 0 additions & 40 deletions roles/koji/tasks/download.yml

This file was deleted.

3 changes: 0 additions & 3 deletions roles/koji/tasks/main.yml

This file was deleted.

0 comments on commit 646d52e

Please sign in to comment.