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

Capture source context for build container image #155

Open
steren opened this issue Mar 29, 2020 · 5 comments
Open

Capture source context for build container image #155

steren opened this issue Mar 29, 2020 · 5 comments

Comments

@steren
Copy link
Collaborator

steren commented Mar 29, 2020

Cloud Run will soon display information from the Container Analysis API related to the provenance of the deployed container image.

Because the button literally deploys from GitHub, it would be very useful to capture which GitHub repo and commit were used to build the container, so that users can know if they are up to date.

@jamesward
Copy link
Contributor

Cool. By "capture" you just mean, let the user know more explicitly, or put that info somewhere?

@steren
Copy link
Collaborator Author

steren commented Mar 30, 2020

I mean automatically send the info the the Container Analysis API.

@ahmetb
Copy link
Contributor

ahmetb commented Mar 30, 2020

I think this is doable. I havent understood the api fully but I’m assuming it only works with sha256 refs; not tags.
That would likely only work for Dockerfile mode where we can collect the sha256 ref of the image from stdout if docker build cmd.

@steren
Copy link
Collaborator Author

steren commented Mar 30, 2020

this is what needs to be populated.

In Java, I've been told it's at occurrence.getBuild().getProvenance().getSourceProvenance().getContext().getGit()

@ahmetb
Copy link
Contributor

ahmetb commented Apr 7, 2020

API is quite damn cryptic but I believe I can GET some of the Occurrences and work my way from there...

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