Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Packit to handle downstream builds #1004

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

mkemel
Copy link
Member

@mkemel mkemel commented Dec 8, 2024

Adding configuration for Packit to:

  1. Propose PR on https://src.fedoraproject.org/rpms/bluechi triggered by release on GH
  2. Once merged (and thus new commit created in dist-git) - Koji and Bodhi updates will be triggered.

The .packit.yml configuration file should be updated in dist-git as well as part of the PR, so no need to create Packit configuration in dist git right now

@mkemel
Copy link
Member Author

mkemel commented Dec 8, 2024

Using propose_downstream for SIG dist-git is WIP for Packit. Hopefully it will be available soon

@engelmi
Copy link
Member

engelmi commented Dec 9, 2024

I think this is a good first step towards automating releases for BlueChi. However, I have a few questions on how this works and fits into our release process:
The propose_downstream will be triggered on "release" - so basically when pushing a new tag - and create a PR on https://src.fedoraproject.org/rpms/bluechi. It is going to create n PRs for all the branches due to the fedora-all and epel-all, right?
So the process then would be merging rawhide, which triggers koji and bodhi. If successful, merge PR for next version, and so on.
We still have to upload the tarball with the sources manually, right? Do we need to set up any credentials for triggering the koji/bodhi build?

@mkemel mkemel requested a review from dougsland December 9, 2024 08:42
@mkemel
Copy link
Member Author

mkemel commented Dec 9, 2024

So the process then would be merging rawhide, which triggers koji and bodhi. If successful, merge PR for next version, and so on.

Yes.

We still have to upload the tarball with the sources manually, right?

No, Packit should do all the magic

Do we need to set up any credentials for triggering the koji/bodhi build?

No, Packit has the required permissions. There are more options that can be configured (e.g. trigger koji build also triggered by direct pushes to dist-git or merged PRs that were not created by Packit). But this configuration is a basic one and should do the trick for our (quite straightforward) process.

Unfortunately there is no way to really test it without running an actual upstream release. But having this inside we can make sure it works when releasing 0.10.
Similar configuration works for qm configured by @dougsland , adding him as a reviewer as well. During the latest release there was a small hiccup with latest fedora version bodhi update, but it was not an issue of the configuration, but of the Packit service itself.

@engelmi
Copy link
Member

engelmi commented Dec 9, 2024

No, Packit should do all the magic

Where do we specify which tarball to use? Since we need git submodules for BlueChi, the default tarball created by GitHub doesn't contain these and the build would fail. We create a suitable tarball during the release pipeline. So we'd need to specify the tarball in the GH release as well as wait for the GH pipeline to finish.

No, Packit has the required permissions.

So they use an account and everything on their side of the service.

Unfortunately there is no way to really test it without running an actual upstream release. But having this inside we can make sure it works when releasing 0.10.

Yes, lets see how it will work for the next release. We can still fallback to manual and refine this further.

@mkemel
Copy link
Member Author

mkemel commented Dec 9, 2024

Where do we specify which tarball to use?

In the specfile:
Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz
I think this is the correct one

So they use an account and everything on their side of the service.

Yes, you can look at qm releases - PRs in src.fedoraproject.com, koji builds and bodhi updates

We can still fallback to manual and refine this further.

Exactly

@mwperina
Copy link
Member

Where do we specify which tarball to use?

In the specfile: Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz I think this is the correct one

Hmm, aren't we uploading this .tar.gz file to the github release manually to contain git submodules content? AFAIK github is not able in its automatic creation of source archive to include git submodules content ...

@mkemel
Copy link
Member Author

mkemel commented Dec 11, 2024

@mwperina Hm, not sure about that, maintainer readme does not mention that. @engelmi ?
In any case, the build is triggered by release, so by the time it is created - we already have the tarball. Unless we upload it AFTER creating the release??

@engelmi
Copy link
Member

engelmi commented Dec 11, 2024

Where do we specify which tarball to use?

In the specfile: Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz I think this is the correct one

Hmm, aren't we uploading this .tar.gz file to the github release manually to contain git submodules content? AFAIK github is not able in its automatic creation of source archive to include git submodules content ...

Yes, the default .tar.gz doesn't include the git submodules and we had to create it manually. This was automated a few months back and should work again (after the tokens were updated), see these CI steps.

@coveralls
Copy link

coveralls commented Dec 11, 2024

Coverage Status

coverage: 80.899% (-0.09%) from 80.989%
when pulling 427784f on mkemel:packit
into 9ea7721 on eclipse-bluechi:main.

Copy link
Member

@engelmi engelmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mkemel
Copy link
Member Author

mkemel commented Dec 11, 2024

I would really like for @dougsland to review this one before we merge

Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mkemel mkemel force-pushed the packit branch 2 times, most recently from 3a09c2f to 63738a6 Compare December 18, 2024 12:03
Adding configuration for Packit to:
1. Propose PR on src.fedoraproject.org triggered by release on GH
2. Once merged (and thus new commit created in dist-git) - Koji and
Bodhi updates will be triggered.

The .packit.yml configuration file should be updated in dist-git as
well as part of the PR, so no need to create Packit configuration
in dist git right now

Signed-off-by: Mark Kemel <[email protected]>
@mkemel mkemel merged commit d409ee5 into eclipse-bluechi:main Dec 20, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants