#147 Add 2 vars for Testing Farm role that are needed for the new rpm-rebuild-job
Merged 2 years ago by zuul. Opened 2 years ago by guyinger.
guyinger/fedora-zuul-jobs playbook_for_running_rpm_rebuild_test  into  master

@@ -26,6 +26,11 @@ 

            "os": {

              "compose": "{{ compose }}",

            },

+           "variables": {

+               "DISTRO": "{{ distro }}",

+               "COMPONENT": "{{ zuul.project.short_name }}",

+               "TARGET_BRANCH": "{{ zuul.branch }}"

+           },

            "artifacts": [

        {%- for repo in zuul.artifacts -%}

        {%- if repo.name == 'repo' -%}

Adding two variables for the new rpm-rebuild-test job:
1. component - the name of that component to test (like ruby).
2. fedora_release - that is essentially the target branch.

info about the variables: https://zuul-ci.org/docs/zuul/latest/job-content.html#var-zuul.items.branch

I am modifying the current testing-farm role that is already used by 'rpm-tmt-test', assuming that providing it with two extra vars won't affect it. (but still needs to be tested).

Alternatively, I can create another PB identical to this one but with a minor change (those two extra vars) and use it only for the rpm-rebuild-test. (but I didn't do it now as I try to avoid duplicate code).

Build succeeded.

Build succeeded.

I'm not sure that the way your try to fetch the data in the inventory will work.

You should look at the inventory of a job that run to see the actual context: for instance: https://fedora.softwarefactory-project.io/zuul/build/0ea284b1d07c4f58964f74220fb77afb/log/zuul-info/inventory.yaml

so maybe use instead : "{{ zuul.branch }}" or "{{ zuul.distro }}"
and "{{ zuul.project.short_name }}"

1 new commit added

  • correct Zull vars
2 years ago

Build succeeded.

Why is not possible to use "{{ distro }}" it seems to be really similar ?

Also I notice that the json is not valid as "," are missing.

Why is not possible to use "{{ distro }}" it seems to be really similar ?

it's a bit different, for example if "distro" is "fedora-35" then "fedora release" would be just "35".

2 new commits added

  • correct Zull vars
  • Add 2 vars for Testing Farm role that are required for the new rpm-rebuild-job
2 years ago

Also I notice that the json is not valid as "," are missing.

fixed, thank you

Build succeeded.

@guyinger we do want this under environments[0].variables, not in tmt context, context is used for adjust to select tests/plans.

1 new commit added

  • move tmt vars from context to variables
2 years ago

Build succeeded.

@guyinger keep this here please, distro field is valuable also for filtering. It should stay here, and also be in variables, this duplicity is expected

@guyinger let's not pretend this is the fedora release, this is the dist-git target branch. Let's call it what it is. We can then guess the release from it nicely (or we just name it the same). I would rename to target_branch.

@mvadkert Should be okay now. Please take a look.

1 new commit added

  • fix variables
2 years ago

Build succeeded.

Let's use capital letters for variables, it is kinda more standard to have them like that, so DISTRO, COMPONENT and TARGET_BRANCH

4 new commits added

  • fix variables
  • move tmt vars from context to variables
  • correct Zull vars
  • Add 2 vars for Testing Farm role that are required for the new rpm-rebuild-job
2 years ago

Build succeeded.

4 new commits added

  • fix variables
  • move tmt vars from context to variables
  • correct Zull vars
  • Add 2 vars for Testing Farm role that are required for the new rpm-rebuild-job
2 years ago

Build succeeded.

LGTM, @fbo I believe we can merge this now!

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

2 years ago

Build succeeded (gate pipeline).

Pull-Request has been merged by zuul

2 years ago