Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Kudu Backend to handle ScmType env #279

Closed
suwatch opened this Issue · 5 comments

3 participants

@suwatch
Owner

This replaces kudu.disableGit env

  1. ScmType does not exist, all git and /deploy endpoints are available (legacy kudu)
  2. ScmType does not contain Hg or Git, block git and /deploy endpoints (for instance, Tfs or None).
  3. ScmType == LocalGit, block /deploy endpoint
  4. ScmType != LocalGit, block git's receive-pack (git push) endpoint (allow just cloning/pulling?)

To be considered
5. ScmType contains Hg, block /deploy with Git package
6. ScmType contains Git, block /deploy with Hg package

@davidebbo
Owner

I think we should skip (4), as the local git endpoint is a good fallback, e.g. when github is down (see this tweet).

Other comment is that unlike what we do today with DisableGit, we should implement this more dynamically instead of doing it at the route level when the AppDomain starts. And we should also move away from our AppSettings class, and use the unified settings instead.

@suwatch suwatch was assigned
@suwatch
Owner

There is a small issue with 3.ScmType == LocalGit, block /deploy endpoint

The intention is we don't want to have anything deployed via CI if we are in LocalGit mode. This works well when switch from CI to LocalGit. This however does not prevent if one switches from GitHub -> LocalGit -> CodePlex. I think it is rare and we could address this by documentation (one should remove the hook). Otherwise we can make /deploy sensitive to individual ScmType. Too complicated?

Another issue is for not-yet-supported-by-portal like Gitlab, Codebase that users do a manual walkthrough (set key, hook url, etc.). Since initial state would be LocalGit, they may need to do one extra step by setting ScmType != LocalGit (say to GitHub).

Thought?

@davidebbo
Owner

I think we should keep this simple and not block too many things. It could be as simple as saying:

  • If ScmType is None or TFS, block both local git and /Deploy
  • Otherwise don't block anything at all
@suwatch
Owner

I think that is best.

@suwatch
Owner

Fix in 31689d9

@suwatch suwatch closed this
@dravva dravva was assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.