Skip to content

Latest commit

 

History

History
76 lines (49 loc) · 2.5 KB

build.adoc

File metadata and controls

76 lines (49 loc) · 2.5 KB

ods-pipeline-python-build

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.

Parameters

Parameter Default Description

working-dir

.

Working directory. The path must be relative to the root of the repository, without leading ./ and trailing /.

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 working-dir contents did not change. You must set this to "false" if the build can be affected by files outside working-dir. See ADR caching-build-tasks for more details and workarounds.

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.

Results

Name Description

build-reused-from-location

The cache location that the build task used. If caching is not enabled this will be an empty string.