Builds Python applications.
The exact build recipe can be found at build/images/scripts/build.sh.
In particular, the Python source files are expected to be located in src
.
The following artifacts are generated by the build task and placed into .ods/artifacts/
-
code-coverage/
-
coverage.xml
-
-
xunit-reports/
-
report.xml
-
Instead of the built-in script, one can also specify a build script located
in the Git repository using the build-script
task parameter. This allows
full control of building and testing, including any generation of artifacts.
Note that some other task parameters have no effect when a custom build
script is used, unless they are handled properly in the script. At a
minimum, the custom script should place its outputs in the directory
identified by output-dir
.
Parameter | Default | Description |
---|---|---|
working-dir |
. |
Working directory. The path must be relative to the root of the repository,
without leading |
cache-build |
true |
If enabled tasks uses or populates cache with the output dir contents (and artifacts) so that a build can be skipped if the |
build-extra-inputs |
List of build source directories (as colon separated string) which in addition working-dir influence the build. These directories are relative to the repository root. If the contents in these directories change the cache is invalidated so that the build task will rebuild from scratch. |
|
build-script |
/usr/local/bin/build-python |
Build script to execute. The default script is located in the container image. If you specify a relative path instead, it will be resolved from the workspace. See the task definition for details how the build script is invoked. |
max-line-length |
120 |
Maximum line length. |
pre-test-script |
Script to execute before running tests, relative to the working directory. |