Integrate with GitHub Deployments #1624
Unanswered
billyshambrook
asked this question in
Proposals
Replies: 2 comments 2 replies
-
@billyshambrook Can I turn this into a Discussion? (I'd need to transfer it to flux2 repo first) |
Beta Was this translation helpful? Give feedback.
0 replies
-
I would like to know more about GitHub Deployments API and how it could be used with Flux, but I haven't found a really good page that explains how it works. Do you have one of these in public that we can refer to, so we can understand better what it is we're talking about? (Is it a tool for creating preview environments?) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, am playing with the idea of how to use GitHub Deployment API to drive deployments in a gitops way. GitHub Deployments API is nice because it provides a UI within GitHub which shows what commits are currently deployed within each environment. This is also useful for doing pull request deployments you can add a URL to the deployment where the deployment can be accessed from which also shows up in the pull request UI.
Was wondering if it makes sense to allow referencing a deployment environment in the GitRepository API. The controller could then fetch the commit sha from the latest deployment that matches that environment, something like:
You could then trigger the controller by creating a new deployment like so:
The new deployment would include the latest sha from the master branch which can be used to grab the latest source.
This however does require the "cluster controller" (e.g. kustomize-controller) to update the deployment status once it has been applied - not sure where this would fit in with regards to the gitops toolkit.
Another problem I can see is that this is GitHub specific but
GitRepository
looks like it should work with any Git provider, not sure if other Git providers have a similar concept which could be used or whether this should be a different kind e.g.GitHubRepository
orGitHubDeployment
Beta Was this translation helpful? Give feedback.
All reactions