Migrate Zuul CI to tmt definition
All checks were successful
Daily comps-sync check / validate (pull_request) Successful in 22s
Validate manifests / validate (pull_request) Successful in 20s

Triggered using a Forgejo action.

See: #757
This commit is contained in:
Cristian Le 2026-05-06 10:00:00 +02:00 • committed by Timothée Ravier
commit 04bd68f6f5
6 changed files with 68 additions and 134 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

View file

@ -0,0 +1,24 @@
name: "Compose tests"
run-name: >
Compose test (${{ forgejo.event_name }})
${{ forgejo.event_name == 'pull_request' && format('PR#{0}', forgejo.event.number) || '' }}
on:
pull_request_target:
types: [opened, synchronize, reopened]
# Prevent multiple workflow runs from racing to ensure that pushes are made
# sequentialy for the main branch. Also cancel in progress workflow runs for
# pull requests only.
concurrency:
group: ${{ forgejo.workflow }}-${{ forgejo.ref }}
cancel-in-progress: true
jobs:
testing-farm:
runs-on: "docker-slim"
steps:
- uses: https://forge.fedoraproject.org/ci/testing-farm@main
with:
api_key: ${{ secrets.TESTING_FARM_API_TOKEN }}
compose: Fedora-Rawhide

View file

@ -1,17 +0,0 @@
- project:
check:
jobs:
- validate
- job:
name: validate
description: Validate manifests, scripts, dependencies and compose the base image
# Increased timeout as builds can take a while
timeout: 3600
run: ci/validate.yaml
nodeset:
nodes:
- name: vm
# Replace by a fixed version label after branching, once available:
# https://fedora.softwarefactory-project.io/zuul/labels
label: cloud-fedora-rawhide-medium

27
ci/plans.fmf Normal file
View file

@ -0,0 +1,27 @@
discover:
how: fmf
execute:
how: tmt
/compose:
discover+:
test: /compose-image
/base-atomic:
environment:
COMPOSE_IMAGE: base-atomic
/silverblue:
environment:
COMPOSE_IMAGE: silverblue
/kinoite:
environment:
COMPOSE_IMAGE: kinoite
/sway-atomic:
environment:
COMPOSE_IMAGE: sway-atomic
/budgie-atomic:
environment:
COMPOSE_IMAGE: budgie-atomic
/cosmic-atomic:
environment:
COMPOSE_IMAGE: cosmic-atomic

16
ci/tests.fmf Normal file
View file

@ -0,0 +1,16 @@
summary: "Compose a bootable container image for an Atomic Desktop"
duration: 30m
require:
- file
- git
- jq
- just
- ostree
- python3-pyyaml
- rpm-ostree
- selinux-policy-targeted
/compose-image:
test: just compose-image $COMPOSE_IMAGE

View file

@ -1,117 +0,0 @@
- hosts: all
tasks:
# https://pagure.io/fedora-ci/general/issue/505
- name: Restart systemd-resolved
become: true
command: systemctl restart systemd-resolved
when: zuul.branch == "rawhide" or zuul.branch == "main"
- name: Upgrade all packages
ansible.builtin.dnf:
name: "*"
state: latest
become: true
- name: Install dependencies
package:
name:
- 'jq'
- 'just'
- 'ostree'
- 'python3-pyyaml'
- 'rpm-ostree'
- 'selinux-policy-targeted'
state: present
become: true
- name: Validate manifests and scripts syntax
ansible.builtin.command:
chdir: "{{ zuul.project.src_dir }}"
cmd: just validate
- name: Verify that the comps and manifests are synced
ansible.builtin.shell:
chdir: "{{ zuul.project.src_dir }}"
cmd: "just validate comps-sync-check && touch .zuulci.comps"
# Still run the next step if this one fails
ignore_errors: true
- name: Perform dependency resolution for Silverblue
ansible.builtin.shell:
chdir: "{{ zuul.project.src_dir }}"
cmd: "just compose-dry-run silverblue && touch .zuulci.silverblue"
# Still run the next step if this one fails
ignore_errors: true
- name: Perform dependency resolution for Silverblue (ostree classic)
ansible.builtin.shell:
chdir: "{{ zuul.project.src_dir }}"
cmd: "just compose-dry-run silverblue-ostree && touch .zuulci.silverblue-ostree"
# Still run the next step if this one fails
ignore_errors: true
- name: Perform dependency resolution for Kinoite
ansible.builtin.shell:
chdir: "{{ zuul.project.src_dir }}"
cmd: "just compose-dry-run kinoite && touch .zuulci.kinoite"
# Still run the next step if this one fails
ignore_errors: true
- name: Perform dependency resolution for Kinoite (ostree classic)
ansible.builtin.shell:
chdir: "{{ zuul.project.src_dir }}"
cmd: "just compose-dry-run kinoite-ostree && touch .zuulci.kinoite-ostree"
# Still run the next step if this one fails
ignore_errors: true
- name: Perform dependency resolution for Sway Atomic
ansible.builtin.shell:
chdir: "{{ zuul.project.src_dir }}"
cmd: "just compose-dry-run sway-atomic && touch .zuulci.sway-atomic"
# Still run the next step if this one fails
ignore_errors: true
- name: Perform dependency resolution for Sway Atomic (ostree classic)
ansible.builtin.shell:
chdir: "{{ zuul.project.src_dir }}"
cmd: "just compose-dry-run sway-atomic-ostree && touch .zuulci.sway-atomic-ostree"
# Still run the next step if this one fails
ignore_errors: true
- name: Perform dependency resolution for Budgie Atomic
ansible.builtin.shell:
chdir: "{{ zuul.project.src_dir }}"
cmd: "just compose-dry-run budgie-atomic && touch .zuulci.budgie-atomic"
# Still run the next step if this one fails
ignore_errors: true
- name: Perform dependency resolution for Budgie Atomic (ostree classic)
ansible.builtin.shell:
chdir: "{{ zuul.project.src_dir }}"
cmd: "just compose-dry-run budgie-atomic-ostree && touch .zuulci.budgie-atomic-ostree"
# Still run the next step if this one fails
ignore_errors: true
- name: Perform dependency resolution for COSMIC Atomic
ansible.builtin.shell:
chdir: "{{ zuul.project.src_dir }}"
cmd: "just compose-dry-run cosmic-atomic && touch .zuulci.cosmic-atomic"
# Still run the next step if this one fails
ignore_errors: true
- name: Perform dependency resolution for COSMIC Atomic (ostree classic)
ansible.builtin.shell:
chdir: "{{ zuul.project.src_dir }}"
cmd: "just compose-dry-run cosmic-atomic-ostree && touch .zuulci.cosmic-atomic-ostree"
# Still run the next step if this one fails
ignore_errors: true
- name: Compose the base variant
ansible.builtin.command:
chdir: "{{ zuul.project.src_dir }}"
cmd: just compose-image base-atomic
- name: Check if any previous dependency resolution steps failed
ansible.builtin.shell:
chdir: "{{ zuul.project.src_dir }}"
cmd: "[[ -f .zuulci.comps ]] && [[ -f .zuulci.silverblue ]] && [[ -f .zuulci.silverblue-ostree ]] && [[ -f .zuulci.kinoite ]] && [[ -f .zuulci.kinoite-ostree ]] && [[ -f .zuulci.sway-atomic ]] && [[ -f .zuulci.sway-atomic-ostree ]] && [[ -f .zuulci.budgie-atomic ]] && [[ -f .zuulci.budgie-atomic-ostree ]] && [[ -f .zuulci.cosmic-atomic ]] && [[ -f .zuulci.cosmic-atomic-ostree ]]"