CentOS-PaaS-SIG / ci-pipeline

There are many projects that are concentrated on CI for Atomic Openshift. This is focused on complete CI testing of all Atomic and Base Runtime components for a new Atomic deliverable that comes from Fedora sources.
GNU General Public License v3.0
23 stars 35 forks source link

Improve test results reporting #774

Open psss opened 5 years ago

psss commented 5 years ago

There has been a discussion about how to improve reporting results in the Standard Test Interface so that it is more easy to distinguish test failure from infrastructure error:

Let's update the pipeline according to the agreed result: The main difference is that ansible-playbook should return non-zero status only upon infrastructure errors while tests failures can be detected from the newly defined file results.yml which will have the following format:

results:
- {result: pass, test: shell/smoke}
- {result: fail, test: shell/login}
- {result: error, test: shell/func}

Extended version with links to logs:

results:
- {result: pass, test: shell/smoke, log: /tmp/artifacts/PASS_shell-smoke.log}
- {result: fail, test: shell/login, log: /tmp/artifacts/PASS_shell-login.log}
- {result: error, test: shell/func, log: /tmp/artifacts/FAIL_shell-func.log}

The expected behaviour of the pipeline is this:

This issue is blocked by implementation of the new functionality in Standard Test Roles which is tracked here:

johnbieren commented 5 years ago

@bgoncalv This is something we should address in the Jenkinsfile of the upstream-fedora-pipeline, right?

bgoncalv commented 5 years ago

@johnbieren right, I think updating the Jenkinsfile on upstream-fedora-pipeline would be the easiest change. Other option would be after the playbook is executed on "package-test.sh". Where do you think makes more sense to parse the results.yml?

johnbieren commented 5 years ago

@bgoncalv good point, perhaps package-test.sh is best since the error codes are right there and we don't have to rely on the proper error code being propagated through