Skip to content

Commit 91337e8

Browse files
authored
Merge pull request #74 from hongweiliu17/STONEINTG-892
feat(STONEINTG-892): update doc for override snapshot
2 parents ad7f32f + cbd180e commit 91337e8

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

docs/modules/ROOT/pages/how-tos/testing/integration/creatingoverridesnapshot.adoc

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,23 @@ spec:
3030
components:
3131
- name: component-sample <2>
3232
containerImage: quay.io/redhat-user-workloads/ws-sample-tenant/application-sample/component-sample@sha256:0db0a473a6abf5c15c424ab07cfbd5c40c06622fe648d4fe6a6b6abc224a0d0c <3>
33+
source: <4>
34+
git:
35+
url: https://github.com/sample-org/sample-repo
36+
revision: fa8b89274a61ef0f1c257b7a84c37aa2ec844109
3337
----
3438
<1> The label `test.appstudio.openshift.io/type: override` that indicates this is an `override` snapshot.
3539
<2> The component name you will reset its Global Candidate List.
3640
<3> The container image with valid digest you will reset the component <2> to.
37-
41+
<4> Optional, but may cause an Enterprise Contract check to fail if it's incorrect or missing. The component source containing the git url and revision that the container image was built from.
3842

3943
. Save the .yaml file and add the snapshot.yaml by running the following command:
4044
+
4145
[source,terminal]
4246
----
4347
$ oc create -f snapshot.yaml -n ws-sample-tenant
4448
----
45-
This command adds the `override` snapshot to your workspace and Integration service will processe the `override` snapshot and update the component `component-sample`'s `.Spec.ContainerImage` to `quay.io/redhat-user-workloads/ws-sample-tenant/application-sample/component-sample@sha256:0db0a473a6abf5c15c424ab07cfbd5c40c06622fe648d4fe6a6b6abc224a0d0c`
49+
This command adds the `override` snapshot to your workspace and integration service will processe the `override` snapshot and update the component `component-sample` 's `.Spec.ContainerImage` to `quay.io/redhat-user-workloads/ws-sample-tenant/application-sample/component-sample@sha256:0db0a473a6abf5c15c424ab07cfbd5c40c06622fe648d4fe6a6b6abc224a0d0c`
4650

4751
== Verification
4852
After integration service processes the created `override` snapshot, you may verify snapshot and component by the following steps:
@@ -59,7 +63,7 @@ status: "True"
5963
type: AddedToGlobalCandidateList
6064
----
6165

62-
. Browse to the component you are updating and select the **Component details** tab. The updated container image is shown under **Image** column.
66+
. Browse to the component you are updating and select the **Component details** tab. The updated container image is shown under **Image** column. The updated source is shown under **Source code** column.
6367

6468
. Check component's `.Spec.ContainerImage` by the following command:
6569
+
@@ -68,3 +72,11 @@ type: AddedToGlobalCandidateList
6872
$ oc get component component-sample -n ws-sample-tenant -o yaml | yq .spec.containerImage
6973
quay.io/redhat-user-workloads/ws-sample-tenant/application-sample/component-sample@sha256:0db0a473a6abf5c15c424ab07cfbd5c40c06622fe648d4fe6a6b6abc224a0d0c
7074
----
75+
76+
. Check component's `.Status.LastBuiltCommit` by the following command:
77+
+
78+
[source,terminal]
79+
----
80+
$ oc get component component-sample -n ws-sample-tenant -o yaml | yq .status.lastBuiltCommit
81+
fa8b89274a61ef0f1c257b7a84c37aa2ec844109
82+
----

0 commit comments

Comments
 (0)