Working with Snapshots
Manual Snapshots
Aside from the Snapshots which are created and processed automatically by the Konflux services, it is also possible to create manual Snapshots which can then be tested and released if they conform to the users requirements.
Prerequisites
-
You have completed the steps listed in the Getting started in the CLI page.
-
You have an existing managed workspace such as
ws-sample
, an application such asapplication-sample
and a component such ascomponent-sample
.
Procedures
To create a manual snapshot, complete the following steps:
-
Identify the application and component images which you want tested and released.
-
In your preferred IDE, create a snapshot definition in a
.yaml
file.-
For example contents, see the example Snapshot section above.
-
-
Save the .yaml file and add the snapshot.yaml by running the following command:
$ kubectl create -f snapshot.yaml -n ws-sample-tenant
This command adds the Snapshot to your workspace and integration service will test and potentially trigger a release of the Snapshot if you have automatic Releases defined.
Verification
You may verify the status of your Snapshot with the following steps:
-
Check if Snapshot passed all tests by getting the
.Status.Conditions.AppStudioTestSucceeded
condition with the following command:$ kubectl get snapshot snapshot-sample -n ws-sample-tenant -o yaml | yq '.status.conditions.[] | select(.type =="AppStudioTestSucceeded")' lastTransitionTime: "2025-01-21T09:18:00Z" message: All Integration Pipeline tests passed reason: Passed status: "True" type: AppStudioTestSucceeded
-
You can check if Snapshot was auto-released getting the
.Status.Conditions.AutoReleased
condition with the following command:$ kubectl get snapshot snapshot-sample -n ws-sample-tenant -o yaml | yq '.status.conditions.[] | select(.type =="AutoReleased")' lastTransitionTime: "2025-01-21T09:18:01Z" message: The Snapshot was auto-released reason: AutoReleased status: "True" type: AutoReleased