GitHub Action used to inject data into validations in Ontrack.
- name: 'my-validation'
uses: nemerosa/[email protected]
By default, the current repository is used to identify the Ontrack project where the validation must be created. If need be, another repository can be specified.
The name of the repository owner where the validation is to be set. If not set, the current repository owner will be used.
The name of the repository where the validation is to be set. If not set, the current repository will be used.
By default, the current workflow run ID will be used to identify the build to validate. It's also possible to use the actual build name or its label.
Name of the Ontrack build where to create the validation. If not set and if build-label
is not set either, the current workflow run ID will be used to identify the build.
Release property (label) of the Ontrack build where to create the validation. If not set and if build-name
is not set either, the current workflow run ID will be used to identify the build.
Name of the validation stamp to create. Defaults to the current step name.
One of PASSED
, FAILED
, WARNING
, etc. Required if the target validation stamp has not been configured for data validation.
One of the following options must be given.
YAML object describing the validation.
Two required fields:
type
- FQCN of the validation type in Ontrackdata
- JSON/YAML representation of the validation data
For example, for a test summary:
with:
validation-data: |-
type: "net.nemerosa.ontrack.extension.general.validation.TestSummaryValidationDataType"
data:
passed: 15
skipped: 8
failed: 5
Shortcut for some test summary validation data.
For example:
with:
test-summary-validation-data: |-
passed: 15
skipped: 8
failed: 5
Shortcut for some metrics validation data.
For example:
with:
metrics-validation-data: |-
position: 2.1
speed: 15.0
acceleration: 7.1
Indicates the path and type of a file containing the validation data.
Several types are supported.
Example:
with:
file-validation-data-type: metrics
file-validation-data-path: path/to/metrics.yaml
The file must be flat YAML file containing the metrics. For example:
position: 2.1
speed: 15.0
acceleration: 7.1
Gets a test summary from a JUnit XML report.
Example:
with:
file-validation-data-type: junit
file-validation-data-path: path/to/report/directory
The path must be a directory containing XML JUnit report. For example:
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="..." tests="7" skipped="0" failures="0" errors="0" timestamp="2022-05-04T09:45:17" hostname="..." time="3.538">
<!-- ... -->
</testsuite>
Only the
tests
,skipped
,failures
anderrors
attributes of thetestsuite
root are used. The rest of the attributes and elements is ignored.
If set to true
, logs additional information on the console.