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

Reference test repository in the test job metadata #968

Closed
mrc0mmand opened this issue Feb 10, 2021 · 7 comments · Fixed by #1021
Closed

Reference test repository in the test job metadata #968

mrc0mmand opened this issue Feb 10, 2021 · 7 comments · Fixed by #1021
Assignees
Labels
area/testing-farm Related to Testing Farm integration. area/user-experience Usability issue good-first-issue Good for newcomers.

Comments

@mrc0mmand
Copy link

Hello!

Would it be possible to use the test job metadata to reference a repository which contains the whole FMF tree with tests to run? Something along these lines:

    jobs:
    - job: tests
      trigger: pull_request
      metadata:
        targets:
        - fedora-all
        repo_url: "https://github.com/johnsmith/my-fabulous-tests"

I know that currently you can reference a test repository using FMF, but even for this you need to have an initialized FMF tree in the repo plus the respective FMF file. Being able to reference the test repo directly in packit.yml would be way nicer, imo.

I'm not sure if this RFE should be filed for Packit or TMT/TFT, so apologies if I chose the wrong project :-)

@lachmanfrantisek lachmanfrantisek added the area/testing-farm Related to Testing Farm integration. label Feb 11, 2021
@csomh
Copy link
Contributor

csomh commented Feb 11, 2021

Hey @mrc0mmand 👋

This is definately the right project to file this issue and this is a good proposal. Let's see what the others say, but I'm all for implementing this... and shouldn't be that difficult either.

@csomh csomh added good-first-issue Good for newcomers. area/user-experience Usability issue labels Feb 11, 2021
@jpopelka
Copy link
Member

I'd call it fmf_url and optional fmf_ref, but yes, makes sense.

    jobs:
    - job: tests
      trigger: pull_request
      metadata:
        targets:
          - fedora-all
        fmf_url: https://github.com/johnsmith/my-fabulous-tests
        fmf_ref: main  # optional, defaults to repo's default branch

It should be as easy as putting this into TF request payload instead of the source repo url/ref.

@mrc0mmand
Copy link
Author

mrc0mmand commented Feb 16, 2021

Looking at a possible implementation (so I could start playing with TFT in systemd) - wouldn't be necessary to extend the metadata-related classes in Packit as well? Like JobMetadataSchema and JobMetadataConfig.

softwarefactory-project-zuul bot added a commit to packit/packit that referenced this issue Mar 18, 2021
Add test repo reference to package-config

This commit adds 'fmf_url' and 'fmf_ref' to JobMetadataConfig. This can
be later used to store tests in different repository.
Related To: packit/packit-service#968

Reviewed-by: Jiri Popelka <None>
Reviewed-by: Tomas Tomecek <[email protected]>
@mfocko
Copy link
Member

mfocko commented Mar 19, 2021

Closed by packit/packit#1155, in case you feel the point of this issue was not fulfilled, please reopen

@mfocko mfocko closed this as completed Mar 19, 2021
@mrc0mmand
Copy link
Author

I suspect this needs #1021 as well, so we can use it with PaaS?

@mfocko mfocko reopened this Mar 19, 2021
softwarefactory-project-zuul bot added a commit that referenced this issue Mar 22, 2021
Allow to reference a test repo in test job metadata

This change allows to specify distinct repository for tests.
Fixes: #968

Reviewed-by: Jiri Popelka <None>
Reviewed-by: Matej Mužila <None>
Reviewed-by: Tomas Tomecek <[email protected]>
@jpopelka
Copy link
Member

@mrc0mmand The change from #1021 has been deployed to the staging instance of the service.
Can you give it a try?
See #649 for instructions.

@mrc0mmand
Copy link
Author

@mrc0mmand The change from #1021 has been deployed to the staging instance of the service.
Can you give it a try?
See #649 for instructions.

Thank you! I'll try to test it out as soon as I have some spare time on my hands (I already have the staging app enabled for my test repo, so it shouldn't be an issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing-farm Related to Testing Farm integration. area/user-experience Usability issue good-first-issue Good for newcomers.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants