Open zhangtbj opened 4 years ago
+1 for status where also the output image should go to. The buildSpec.source.revision should be the input that we get from the user through the build cr that he creates. He might have specified a branch name as revision there and we should not confuse him by changing this value.
Yes, let's keep it in the status
We should also store the Git
revision
in BuildRun status so that the end user can know which commit he used to build image.There are two options:
Add a new item to show the revision directly, like:
apiVersion: build.dev/v1alpha1 kind: BuildRun ... status: gitRevision: 6bb1bb829fb149362e53933c83c6ae9bf48332e6 buildSpec: .. latestTaskRunRef: s2i-xtsnk reason: Running startTime: "2020-05-14T13:25:47Z" succeeded: Unknown
Modify the Revision in the BuildSpec.source.revision:
apiVersion: build.dev/v1alpha1 kind: BuildRun ... status: buildSpec: builder: image: docker.io/centos/nodejs-10-centos7 output: credentials: name: icr-knbuild image: us.icr.io/source-to-image-build/e2e-image:s2i source: url: https://github.com/sclorg/nodejs-ex revision: 6bb1bb829fb149362e53933c83c6ae9bf48332e6 strategy: kind: ClusterBuildStrategy name: source-to-image latestTaskRunRef: s2i-xtsnk reason: Running startTime: "2020-05-14T13:25:47Z" succeeded: Unknown
So we can discuss which one is better, or any other suggestion?