-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Description
Right now the only implementation visible is to create srpms, for which the user cannot find much application for. I want to flush out what the full implementation of the GH action should be and how it could be used in the future.
Overall the idea is that packit application is the main intermediator and the default implementation if no GH action is setup, while packit GH action is the way to get fine-grained control of each operation.
Github action
All packit actions available in the cli and packit-service should be implemented as separate actions (rtd/actions for reference). If in the specific commit associated with a trigger, it is detected that a github workflow contains any of these GH actions, then do not trigger packit application workflow, but instead wait for the workflow to trigger them (either directly via packit cli, or indirectly by calling packit-service somehow). Otherwise default to the packit application workflows.
Benefits
- fine-grained control of the workflow
- reduced build requests
- piggy-back onto GH action workflows (solves issues like propose-downstream: adjust retries to consider waiting for actions packit#1954, Supporting
[skip ci]and[ci skip]in the commit message packit#1987)
Example interface
jobs:
normal-test:
...
packaging-test:
needs: [ normal-test ]
steps:
- uses: packit/actions/build_copr@latest
with:
targets: [ fedora-development ]
- uses: packit/actions/test@latest
with:
targets: [ fedora-development ]Implementation considerations
- Should all
jobs:in.packit.yamlbe ignored and require them to be defined within GH action?
(if in the commit/PR it is detected that there exists at least oneuses: packit/actions, otherwise use default packit app logic) - Should the packit action version be synchronized with the packit cli, or should it be adjustable via
with:version:...?
If the former, it would be better to move these directly inpackit/packit, that way PRs and fork versions can be tested more easily.
What needs to be implemented
- packit-action:
packit_setup
- Basically run: (python_setupif a python version is passed + )pip install packitwith appropriate cachings
- Other actions might be necessary, e.g.: converting a base64 secret to a kerberos identity
- This might or might not be necessary depending on what backend we want to use, i.e. it is not necessary if we make the actions as container actions.
- The only thing concerning me here is, how will it behave in nested container or in combination with other actions. Defining this action instead of using containers would guarantee there is no clashing - packit-action:
srpm
- Simply runpackit srpmand uploading the artifacts if needed - packit-action:
build_copr
- Triggerpackit build in-copr
- Requires setting up appropriate authenthication
- Need to research how to properly interact with timeout to allow for long runs and report progress
- Using nodeJS action would be helpful for this one - packit-action:
test
- No availablepackitcommand. Basically given a previousbuild_coprID, trigger the appropriate testing-farm interface
- Probably useful: https://github.com/sclorg/testing-farm-as-github-action
- Requires setting up appropriate authenthication. Rather tricky, because do we authenticate as User or Packit? If the later how could we do that safely? - packit-action:
propose_downstream
- Runpackit propose_downstream --local-content
- Requires setting up appropriate authenthication
Metadata
Metadata
Assignees
Labels
Type
Projects
Status