Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Git revision in BuildRun status #205

Open
zhangtbj opened this issue May 15, 2020 · 2 comments
Open

Support Git revision in BuildRun status #205

zhangtbj opened this issue May 15, 2020 · 2 comments

Comments

@zhangtbj
Copy link
Contributor

zhangtbj commented May 15, 2020

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?

@SaschaSchwarze0
Copy link
Member

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

@sbose78
Copy link
Member

sbose78 commented May 19, 2020

Yes, let's keep it in the status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants