Add script to help CI builds
Add script to help CI builds

The script implements steps for (1) setup, (2) build, and (3) gathering
results, including logic for special cases.  It also enables (4) more
extensive tweaking and parameterization of the build pipelines in
combination with Go.CD parameters and environment variables.

(1) Examples of setup steps are to add DL_DIR and SSTATE_DIR settings to
configuration, and to copy binary drivers into the project when that is
required.

(2) Examples of build steps are to run init.sh and bitbake with the
required parameters that could differ depending on build type.

(3) Examples of gathering results are to copy or move all artifacts from
diverse places in the build tree into a staging directory which can be
defined as a single place for the CI system to collect artifacts, in a
way that is robust so that it does not cause the pipeline to fail if
something is (allowed to be) missing in a particular configuration.  In
the future I expect also storing more build-statistics and information
could be added to this category.

(4) Examples of parameterization are that the chosen material can be
overridden by environment variables, forcing a particular fork, branch,
tag, or commit hash to be built, and that reuse of cached material can
be enabled/disabled similarly.  The script also stores sensible defaults
for such options in a single place.

We should expect frequent updates and improvements to this, to move more
complexity and special needs to a single place.

The reason for this is that previously much of this logic was encoded in
Tasks inside Jobs in Go.CD CI.  Initially the pipelines were simple and
usage of Go.CD Templates reduced the work somewhat, but over time
several special cases and other details have created complexity that
causes frequent breakage.  The script might also be useful locally *if*
the user carefully understands what it does.  For that reason it has a
catch that warns the user and makes it almost impossible to run "by
mistake".

Signed-off-by: Gunnar Andersson <df6c1dc70ee3404c16d7de0a5a8d978b44fa18d4@genivi.org>

DunderRoffe/genivi-dev-platform,GENIVI/genivi-dev-platform,gunnarx/genivi-dev-platform,GENIVI/genivi-dev-platform,DunderRoffe/genivi-dev-platform,chbae/genivi-dev-platform,DunderRoffe/genivi-dev-platform,DunderRoffe/genivi-dev-platform,chbae/genivi-dev-platform,DunderRoffe/genivi-dev-platform,GENIVI/genivi-dev-platform,chbae/genivi-dev-platform,gunnarx/genivi-dev-platform,gunnarx/genivi-dev-platform,gunnarx/genivi-dev-platform,chbae/genivi-dev-platform,GENIVI/genivi-dev-platform