Add support for a skip-if filter on jobs

There was previously no way to skip a job if the contents of a given
patchset did not require it to be run.  This meant that tempest jobs
would run in response to patchsets that would not affect their
execution, like those that only modified documentation or unit tests.
This change introduces a 'skip-if' configuration option that allows
jobs to be configured to not run when specified criteria are met.

Change-Id: I9b261f03ec00426160d9396f3a20312e89b624d4
diff --git a/tests/fixtures/layout-skip-if.yaml b/tests/fixtures/layout-skip-if.yaml
new file mode 100644
index 0000000..0cfb445
--- /dev/null
+++ b/tests/fixtures/layout-skip-if.yaml
@@ -0,0 +1,29 @@
+pipelines:
+  - name: check
+    manager: IndependentPipelineManager
+    trigger:
+      gerrit:
+        - event: patchset-created
+    success:
+      gerrit:
+        verified: 1
+    failure:
+      gerrit:
+        verified: -1
+
+
+jobs:
+  # Defining a metajob will validate that the skip-if attribute of the
+  # metajob is correctly copied to the job.
+  - name: ^.*skip-if$
+    skip-if:
+      - project: ^org/project$
+        branch: ^master$
+        all-files-match-any:
+          - ^README$
+  - name: project-test-skip-if
+
+projects:
+  - name: org/project
+    check:
+      - project-test-skip-if