Decide which jobs should perform "extra work"

Right now we're "conserving resources" by lumping some unrelated work to
our jobs. A fine example is generating docs via Doxygen. This makes
sense because the CI system has a certain overhead, and it will only
become even more important with coverage testing that requires running
full build and a test suite. On the other hand, it is actively wasteful
to do this in all builds; normally it should be enough to build docs
just once, let's say when building with baseline GCC, and don't bother
with this extra work when doing a TSAN or ASAN+UBSAN build, or when
testing with another compiler.

This job therefore creates an env variable for our shell script,
JOB_PERFORM_EXTRA_WORK, which can be used by each project's build script
to decide whether or not to run bits such as `make docs`.

Change-Id: Id08afa2e75ec0c78435912eb7725b1b2bff296a2
diff --git a/roles/run-test-command/tasks/main.yaml b/roles/run-test-command/tasks/main.yaml
index 1f16aa6..c195cca 100644
--- a/roles/run-test-command/tasks/main.yaml
+++ b/roles/run-test-command/tasks/main.yaml
@@ -2,3 +2,5 @@
   command: '{{ test_command }}'
   args:
     chdir: '{{ zuul.project.src_dir }}'
+  environment:
+    JOB_PERFORM_EXTRA_WORK: '{{ perform_extra_work | ternary("1", "0") }}'