#142 Add check for sti tests
Merged 2 years ago by zuul. Opened 2 years ago by guyinger.
guyinger/fedora-zuul-jobs-config check_for_sti_jobs  into  master

Add check for sti tests
ginger • 2 years ago  
@@ -0,0 +1,18 @@ 

+ ---

+ - hosts: localhost

+   tasks:

+     - name: Check for tests/tests.yml exists

+       stat:

+         path: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests/tests.yml"

+       register: tests_stat

+     - zuul_return:

+         data:

+           zuul:

+             child_jobs:

+               - rpm-sti-test

+       when: tests_stat.stat.exists

+     - zuul_return:

+         data:

+           zuul:

+             child_jobs: []

+       when: not tests_stat.stat.exists

file modified
+10
@@ -83,6 +83,15 @@ 

        , nodeset = Some executor_nodeset

        }

  

+ let check_for_sti_tests =

+       Zuul.Job::{

+       , name = "${job-prefix}check-for-sti-tests"

+       , description = Some "Check the project has a tests/tests.yml"

+       , branches = Some Branches.allText

+       , run = Some "playbooks/rpm/check-for-sti-tests.yaml"

+       , nodeset = Some executor_nodeset

+       }

+ 

  let check_for_fmf_tests =

        Zuul.Job::{

        , name = "${job-prefix}check-for-fmf-tests"
@@ -300,6 +309,7 @@ 

  let Jobs =

          [ clean_stalled_koji_tasks

          , check_for_tests

+         , check_for_sti_tests

          , check_for_fmf_tests

          , check_for_arches

          , common_koji_rpm_build

file modified
+14
@@ -27,6 +27,20 @@ 

        nodes: []

  

  - job:

+     name: check-for-sti-tests

+     description: Check the project has a tests/tests.yml

+     run: playbooks/rpm/check-for-sti-tests.yaml

+     branches:

+       - rawhide

+       - f35

+       - f34

+       - f33

+       - epel8

+       - main

+     nodeset:

+       nodes: []

+ 

+ - job:

      name: check-for-fmf-tests

      description: Check the project has a .fmf directory

      run: playbooks/rpm/check-for-fmf-tests.yaml

no initial comment

Zuul encountered a syntax error while parsing its configuration in the
repo fedora-zuul-jobs on branch master. The error was:

Job check-for-tests not defined

The error appears in the following project-template stanza:

project-template:
name: test
check:
jobs:
- check-for-tests:
dependencies:
- rpm-scratch-build
- check-for-fmf-tests:
dependencies:
- rpm-scratch-build
- rpm-install-test:
dependencies:
- check-for-tests
- rpm-scratch-build
- rpm-test:
dependencies:
- check-for-tests
- rpm-scratch-build
- rpm-tmt-test:
dependencies:
- check-for-fmf-tests
- rpm-scratch-build

in "fedora-zuul-jobs/zuul.d/templates.yaml@master", line 32, column 3

As I said we need to move forward step by step, so in this PR we need to keep "check-for-tests" (even if it will removed later in the change process) and only add "check-for-sti-tests" job along with the required playbook.

Would you like to update that change according to ^ ?

rebased onto 6340f98d86817026bb68262a9ee074ea3a9b5a59

2 years ago

Build succeeded.

rebased onto be787d9

2 years ago

Build succeeded.

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