Pierre-Yves Chibon
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Publish Note

      Everyone on the web can find and read all notes of this public team.
      Once published, notes can be searched and viewed by anyone online.
      See published notes
      Please check the box to agree to the Community Guidelines.
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Publish Note

Everyone on the web can find and read all notes of this public team.
Once published, notes can be searched and viewed by anyone online.
See published notes
Please check the box to agree to the Community Guidelines.
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
--- title: On-boarding new CI systems in Fedora tags: Fedora, Infra, CPE, CI --- On-boarding new CI systems in Fedora ==================================== ::: danger This document is a work in progress, some part of it are quite stable, other will changed without notice. Please do not rely on it for anything without explicit agreement. ::: This document describes the requirement for on-boarding/adding a new CI system in Fedora and have it be considered for gating packages. [toc] ## The unit of change Fedora has a few places where changes happen, there is the [git repository](https://src.fedoraproject.org/) storing the spec files and patches. There is the [build system](https://koji.fedoraproject.org/) where artifacts are built and there is the [update system](https://bodhi.fedoraproject.org/) where artifacts are pushed to our users in the form of updates. There is however no one to one relation between a commit and an update. A commit can be built but does not have to. A build can be turned into an update but does not have to. Therefore it is important to consider what is the unit of change your CI system will test. Currently the system is designed around the concept of NVR (name-version-release) which apply to the RPM ecosystem. We recommend that **updates (ie: [bodhi updates](https://bodhi.fedoraproject.org/)) be the unit of change**. ## Triggering the tests You will want your CI system to trigger its tests based on messages sent on the Fedora message bus. The Fedora message bus is a [rabbitmq](https://www.rabbitmq.com/) message broker. :::info The [fedora-messaging](https://fedora-messaging.readthedocs.io/en/latest/) library has been developed to help standardize and make interaction with that broker easier. While helpful and recommended, its use is not mandatory. ::: ### From the update system There is currently a dedicated message sent by bodhi (the update system) to inform the CI systems that an update is ready to be tested. This message has for topic: ``org.fedoraproject.prod.bodhi.update.status.testing.koji-build-group.build.complete`` You can find example of these messages in datagrepper: https://apps.fedoraproject.org/datagrepper/raw?topic=org.fedoraproject.prod.bodhi.update.status.testing.koji-build-group.build.complete ### From the build system If you really want to run the test for every build made, you can trigger of the messages sent by the build system: - https://apps.fedoraproject.org/datagrepper/raw?topic=org.fedoraproject.prod.buildsys.task.state.change You can see in these messages a ``state`` field, here is what it corresponds to (from the koji python module): ```python >>> import koji >>> koji.TASK_STATES { 'FREE': 0, 'OPEN': 1, 'CLOSED': 2, 'CANCELED': 3, 'ASSIGNED': 4, 'FAILED': 5, } ``` ### From the commits If you really want to run tests for every commit made in the git repositories, you can trigger of the messages sent by dist-git: - https://apps.fedoraproject.org/datagrepper/raw?topic=org.fedoraproject.prod.git.receive ## Reporting test results Test results from your CI pipeline should be published on the Fedora message bus. Depending on how/where your tests are running, you may already have certificates to sign your messages be allowed to send messages to our broker. If you do not, you will need to open a ticket in the fedora-infrastructure tracker: https://pagure.io/fedora-infrastructure/new_issue ### Topic of the message The topic of the message should follow these basic principle: - Message topics are for clients to filter messages on, so they should be about important parts of the message. - A message from a service should likely start with the name of that service - Clients are probably also interested in filtering messages by status, so it could include a segment with queued, running, completed, failed, canceled, or similar. - Clients are probably also interested in filtering messages by subject (the artifact tested) so including it in the topic is helpful. - It's best to start more general and get more specific for each section of the topic. - Topic lengths are limited to 255 characters - For historical reasons, topics have been prefixed with where they originate from: `org.fedoraproject.{prod,stg}`, `org.centos.{prod|stg}`, `io.pagure.{prod|stg}` and so on. This structure is still expected by some of our apps so please respect it for now. For details on AMQP topic rules, see https://www.rabbitmq.com/amqp-0-9-1-reference.html#queue.bind.routing-key. ::: warning While there is currently no generic pattern to follow for the topic of CI systems. We are considering it and may thus adjust this document accordingly. ::: ### Content of the message The OSCI team at Red Hat, has come up with a standardized format, enforced with a JSON schema, which contains all the information (and more) needed for your test results to be considered for gating. Please use the following example: - For an update (thus multiple builds): https://pagure.io/fedora-ci/messages/blob/master/f/examples/koji-build-group.build.complete.json Enforced by this schema: - https://pagure.io/fedora-ci/messages/blob/master/f/schemas/koji-build-group.build.complete.yaml ::: info This repository also contains schema and examples if you wish to report test results for a single build or for a commit. ::: ## Integrating into Fedora's gating Fedora is gating its updates using the duo: [greenwave](https://pagure.io/greenwave/) and [waiverdb](https://pagure.io/waiverdb/). greenwave queries [resultsdb](https://pagure.io/taskotron/resultsdb/) for [test results](https://taskotron.fedoraproject.org/resultsdb/results) about the artifact of interest and makes a decision about it considering configured policies, the test results and the waivers submitted. Greenwave's decision is what leads to updates being gated or not. So for your results to be evaluated, they need to be uploaded to resultsdb. This is achieved by [resultsdb-listener](https://pagure.io/ci-resultsdb-listener/) which listens for certain messages on the bus and as it sees them, upload them a results into resultsdb. If your messages are following the schema described in the previous section, adding support for your CI system to resultsdb-listener should be as simple as adding the topic you're sending and a unit-test for it. Otherwise, a little more coding will likely be needed. In all cases, unit-tests will be asked. ## Questions? If you have any question about this document, please contact us using the Fedora CI mailing list: https://lists.fedoraproject.org/archives/list/ci@lists.fedoraproject.org/

Import from clipboard

Paste your webpage below. It will be converted to Markdown.

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template is not available.
Upgrade
All
  • All
  • Team
No template found.

Create custom template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

How to use Slide mode

API Docs

Edit in VSCode

Install browser extension

Get in Touch

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

No updates to save
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully