Skip to main content

datacontract ci

Run tests for CI/CD pipelines. Emits GitHub Actions annotations and step summary.

datacontract ci [OPTIONS] [LOCATIONS]...
ArgumentDefaultDescription
[LOCATIONS]...—The location(s) (url, s3 url, or local path) of the data contract yaml file(s).
OptionDefaultDescription
--json-schema—The location (url or path) of the ODCS JSON Schema
--serverallThe server configuration to run the schema and quality tests. Use the key of the server object in the data contract yaml file to refer to a server, e.g., production, or all for all servers (default).
--publish—The url to publish the results after the test.
--output—Specify the file path where the test results should be written to (e.g., './test-results/TEST-datacontract.xml').
--output-format—The target format for the test results. Accepted values: json, junit.
--metadata-only / --no-metadata-only--no-metadata-onlyRun only checks that read the schema (field presence and types). Checks that read row values are skipped.
--logs / --no-logs--no-logsPrint logs
--jsonoffPrint test results as JSON to stdout.
--fail-onerrorMinimum severity that causes a non-zero exit code.
--ssl-verification / --no-ssl-verification--ssl-verificationSSL verification when publishing the data contract.
--custom-quality-checks—Folder with the custom quality checks the contract's quality rules use, one YAML file per check. Defaults to DATACONTRACT_CUSTOM_QUALITY_CHECKS.
--inline-references / --no-inline-references--inline-referencesResolve authoritativeDefinitions of type definition, semantics or businessDefinition and inline them into the contract. Relative URLs and semantics IRIs are looked up on the ENTROPY_DATA_HOST (default https://api.entropy-data.com), other URLs are fetched directly, file references are read from disk. See https://cli.datacontract.com/semantics
--debug / --no-debug—Enable debug logging
datacontract ci datacontract.yaml --output test-results.xml --output-format junit

Guide: Scheduling.