Verifying Freight in a Stage
Following a successful Promotion
(i.e. the process succeeded), it is often
desired to assert whether updated code or configuration meets expectations.
Verification is an optional, user-defined process to test the Freight
in a
given Stage
. Common examples of verification include:
- Executing containerized integration test scripts
- Querying monitoring tools (e.g. DataDog, Prometheus) and measuring application KPIs
- Performing HTTP requests to internal services or systems and interpreting responses as success/fail
- Running load generation tests
When a Stage
with verification is upstream from other Stage
s, Freight
must pass verification there before becoming eligible to be promoted downstream.
Configuring Verification
A Stage
can be configured with verification by referencing one or more
AnalysisTemplates
in its spec.verification
field. In the following example
the dev
Stage
references an AnalysisTemplate
named integration-test
,
which executes after any successful Promotion
:
apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
metadata:
name: dev
namespace: guestbook
spec:
# ...
verification:
analysisTemplates:
- name: integration-test