Skip to content

Commit

Permalink
Merge pull request #74 from hongweiliu17/STONEINTG-892
Browse files Browse the repository at this point in the history
feat(STONEINTG-892): update doc for override snapshot
  • Loading branch information
arewm authored Jul 1, 2024
2 parents ad7f32f + cbd180e commit 91337e8
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,23 @@ spec:
components:
- name: component-sample <2>
containerImage: quay.io/redhat-user-workloads/ws-sample-tenant/application-sample/component-sample@sha256:0db0a473a6abf5c15c424ab07cfbd5c40c06622fe648d4fe6a6b6abc224a0d0c <3>
source: <4>
git:
url: https://github.com/sample-org/sample-repo
revision: fa8b89274a61ef0f1c257b7a84c37aa2ec844109
----
<1> The label `test.appstudio.openshift.io/type: override` that indicates this is an `override` snapshot.
<2> The component name you will reset its Global Candidate List.
<3> The container image with valid digest you will reset the component <2> to.

<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.

. Save the .yaml file and add the snapshot.yaml by running the following command:
+
[source,terminal]
----
$ oc create -f snapshot.yaml -n ws-sample-tenant
----
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`
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`

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

. Browse to the component you are updating and select the **Component details** tab. The updated container image is shown under **Image** column.
. 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.

. Check component's `.Spec.ContainerImage` by the following command:
+
Expand All @@ -68,3 +72,11 @@ type: AddedToGlobalCandidateList
$ oc get component component-sample -n ws-sample-tenant -o yaml | yq .spec.containerImage
quay.io/redhat-user-workloads/ws-sample-tenant/application-sample/component-sample@sha256:0db0a473a6abf5c15c424ab07cfbd5c40c06622fe648d4fe6a6b6abc224a0d0c
----

. Check component's `.Status.LastBuiltCommit` by the following command:
+
[source,terminal]
----
$ oc get component component-sample -n ws-sample-tenant -o yaml | yq .status.lastBuiltCommit
fa8b89274a61ef0f1c257b7a84c37aa2ec844109
----

0 comments on commit 91337e8

Please sign in to comment.