#185 Add `fedora-ci` initiator context
Merged by zuul. Opened by lecris.
lecris/fedora-zuul-jobs feat/initiator  into  master

Download 185.patch

For reference:
- tmt document: https://tmt.readthedocs.io/en/stable/spec/context.html#initiator
- example packit implementation: https://github.com/packit/packit-service/blob/19300103c2d9b65a165526b2070bf2ff9ee9090f/packit_service/worker/helpers/testing_farm.py#L516-L521

Should announce tmt upstream that this will be implemented. Not sure if it makes sense to have two different context for fedora-ci run on zuul, or from bodhi or for plans outside of the repo like rpminspect

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/e9624863e1724f409c98999a7ad5f950

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/27e3c8ac185e4328be4b209f14c26948

@mvadkert Hi, would you like to review and set the 'gateit' label I think you have the right project member level to set the tag.

Or should I ?

just a sec, need to confirm centos does not use this role :)

@fbo can you tell me how to verify this role is not used there?

Zuul config is here:
https://gitlab.com/redhat/centos-stream/ci-cd/zuul

Wasn't the announcement that CentOS would not be using Fedora-CI, or are they still in the process of decoupling?

@lecris which announcement? It is not about Fedora CI so much, we might be sharing the changed Testing Farm integration role ...

Testing Farm is the unifying piece everywhere where we need to run tmt tests at a scale :)

I was thinking about this discussion. I didn't follow on what the plans are for that

@mvadkert https://gitlab.com/redhat/centos-stream/ci-cd/zuul/jobs-config/-/blob/master/playbooks/testing-farm/run.yaml?ref_type=heads It seems to be the case.

@fbo how does Zuul know that the role points to this repository? (sorry for the silly questions)

https://gitlab.com/redhat/centos-stream/ci-cd/zuul/jobs-config/-/blob/master/zuul.d/jobs.yaml?ref_type=heads#L13 It comes from there.

@lecris so we need a different approach, the initiator context should be controlled by an variable on the job level, so we can make it correct for both usages and prevent code duplication,

@fbo thank you and what would be the best place for this variable?

@lecris also I would make it optional, with an if block around the json, in case it is not set, it would not be set

perhaps use: "{{ tft_initiator | default('fedora-ci') }}"

Then add a Zuul job variable in both testing farm jobs https://gitlab.com/redhat/centos-stream/ci-cd/zuul/jobs-config/-/blob/master/zuul.d/jobs.yaml?ref_type=heads#L61 ?

perhaps use: "{{ tft_initiator | default('fedora-ci') }}"

Yeah, I was thinking of such a design, but I would prefer to make it required. Where are the consumers of the role on Fedora-CI side? @mvadkert Do you want to handle the MR on the CentOS-CI side, or should I make a PR there?

@lecris if you can make an MR from a fork there, would be great, ty!

I agree maybe make it required .... not the default, to mitigate users using it and not recognizing it needs to be changed

rebased onto d0f8bd7df043c489995346b56a90f511cd65e0b1

I am still missing where to add the tf_initator input for testing-farm-run-test consumers on the Fedora-CI side. It could be in a simple groups or something, but I don't know in which repo to look for

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/3552cc8c24e24d54a0566230ed04033a

rebased onto 9025a4ac583660ce404ddc2b17eccbffda90afbc

I have opened the relevant PRs:
- https://pagure.io/fedora-zuul-jobs-config/pull-request/189
- https://gitlab.com/redhat/centos-stream/ci-cd/zuul/jobs-config/-/merge_requests/72

In principle those PR should work as standalone, but maybe they should be marked as dependency of this anyway? Can that be done from zuul alone?

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/9854a21309fd43d1a125fee8af27a615

rebased onto eee6b0aab62498fec2520d0ba7f688040c8e6864

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/d541a5db67bd4760ad0c205c12d9d6f9

Metadata Update from @mvadkert:
- Request assigned

Metadata Update from @mvadkert:
- Pull-request tagged with: gateit

tested manually:

https://matrix.to/#/!cfWVeczGVJbiKSlrwi:fedoraproject.org/$aFKelPsadgELAuZ8gMDQfksnFAyQvfsl_OcjRuZVCaA?via=fedoraproject.org&via=fedora.im&via=matrix.org

Build succeeded (gate pipeline).
https://fedora.softwarefactory-project.io/zuul/buildset/02684d716ad94163b86124bc1a4d729f

Pull-Request has been merged by zuul

Metadata