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

feature: Polling of repo for changes at a given interval #12

Closed
djt opened this issue Apr 27, 2022 · 5 comments
Closed

feature: Polling of repo for changes at a given interval #12

djt opened this issue Apr 27, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@djt
Copy link

djt commented Apr 27, 2022

A clear and concise description of what you want the system to do.

Polling to allow for private deployments to check repository for changes to trigger a pull.

What are the Caddyfile directives that need to be added.

Add Caddyfile directive:

git {
  repo foo {
    interval <seconds>
  }
}

I love the work you've done on this, I was quite disappointed when I found that references online to http.git were for caddy v1 so this really fills a void.

For servers that have open access it works great, but some internal work I do does not allow external traffic (for the webhook to hit) which is why the polling would be super beneficial.

@greenpau
Copy link
Owner

Polling to allow for private deployments to check repository for changes to trigger a pull.

@djt, did you check whether update every <seconds> does what you want? I don't remember whether I implemented it or not.

// update every <seconds>

@greenpau
Copy link
Owner

@djt , never mind ... I need to implement this.

@greenpau greenpau added enhancement New feature or request and removed need triage labels Apr 30, 2022
@greenpau
Copy link
Owner

@djt , this is now part of v1.0.6

@djt
Copy link
Author

djt commented May 1, 2022

Great, thanks so much Paul.

Such great work you're doing with this.

@djt
Copy link
Author

djt commented Sep 8, 2022

@greenpau I've been using this and it works great, one little bug though that may be due to my own config.

I have the --watch flag run with caddy to update on config changes, and was recently testing out a new server config. It looks like the timer from the prior config does not end when a new one is loaded.

A quick test will allow you to see, set "update every 1" in the config and then edit it to "update every 60", config will reload but the old timer will still run. If you repeat this, even for an unrelated config change, multiple timers can be seen running.

Let me know if you need any further details, or if you'd rather me open a new issue.

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

No branches or pull requests

2 participants