Use per-repo tests with openstack-infra, deduplicating the places where what-to-test is defined

Registered by Stephan Renatus

As of now, the tests that are run on each cookbook (Rubocop, FoodCritic, ChefSpec) are specified in macros.yaml of openstack-infra's jenkins job builder:

https://github.com/openstack-infra/config/blob/master/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml#L139-L169

Strainer would allow us to define _per cookbook_ what should be run; and offer the one true place for easy, reviewed changes.

The downside is what we'd probably, by having only one "bundle exec strainer test" call per cookbook change, lose the quick visual response we have now -- for example: "chef-lint failed, the rest is ok".

Any ideas on how to implement this in a strainer-only way?

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Stephan Renatus
Direction:
Needs approval
Assignee:
None
Definition:
Obsolete
Series goal:
None
Implementation:
Deferred
Milestone target:
None
Completed by
Jan Klare

Related branches

Sprints

Whiteboard

Maybe this is going to help here:

17:36 < fungi> srenatus: there is work underway to replace jenkins with a more flexible job runner which can return more specific status information on task completion. right now we get "pass" or "fail" so there's no easy way to break that out into a list of discrete states for sub-tasks.

Another option -- to get the tests into the repo and out of JJB -- could be the following kludge:

Add a "run_tests.sh" script into each repo that basically does

```
#!/bin/bash
case "$1" in

style)
  ruby1.9.1 /usr/bin/bundle exec rubocop

lint)
 ...

spec)
  # berkshelf
  # rspec
```

Gerrit topic: https://review.openstack.org/#q,topic:bp/per-repo-tests,n,z

Addressed by: https://review.openstack.org/98083
    Fix Strainerfile

Addressed by: https://review.openstack.org/98099
    Fix Strainerfile

Addressed by: https://review.openstack.org/98133
    Fix Strainerfile

Addressed by: https://review.openstack.org/98134
    Fix Strainerfile

Addressed by: https://review.openstack.org/98135
    Fix Strainerfile

Addressed by: https://review.openstack.org/98136
    Fix Strainerfile

Addressed by: https://review.openstack.org/98137
    Fix Strainerfile

Addressed by: https://review.openstack.org/98139
    Fix Strainerfile

Addressed by: https://review.openstack.org/98141
    Fix Strainerfile

Addressed by: https://review.openstack.org/98143
    Fix Strainerfile

Addressed by: https://review.openstack.org/98144
    Fix Strainerfile

Addressed by: https://review.openstack.org/98145
    Fix Strainerfile

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.