Thomas Jackson
4df44b1fcf
Add http handler option
2019-01-22 17:26:27 -08:00
Thomas Jackson
f1a1a1b61e
Use depth option when doing fetches
...
Previously the `depth` flag was only used for the initial clone-- so
although you might start with a depth=10 as more commits show up you are
always >10. With this diff we enforce that depth on each fetch, this way
old-commits can get GCd off to reduce the size of the local checkout
required.
2019-01-22 16:44:16 -08:00
Thomas Jackson
87503c6dce
Clarify webhook behavior in docs/README
2019-01-22 14:12:49 -08:00
Thomas Jackson
edaa75b8a5
Remove empty comment line
2019-01-22 14:12:49 -08:00
Thomas Jackson
ad41260327
Clarify success-status config/option
2019-01-22 14:12:49 -08:00
Thomas Jackson
54ec971ba0
Remove "duration" from flag/env/var names
2019-01-22 14:12:49 -08:00
Thomas Jackson
6e0bd948ec
Add option to control backoff for failed webhook calls
2019-01-22 14:12:49 -08:00
Thomas Jackson
fdc9b49de2
Reduce to a single webhook call
2019-01-22 14:12:49 -08:00
Thomas Jackson
96714ebed2
Remove global trigger channel
...
Instead change syncRepo to return a boolean which is whether a change
occured.
2019-01-22 14:12:49 -08:00
Thomas Jackson
39ca0a2ca0
Fix error log to print out actual status codes
2019-01-22 14:12:49 -08:00
Thomas Jackson
18f68d3ab6
Move timeout into the json arg for webhook
2019-01-22 14:12:49 -08:00
Thomas Jackson
a45699efb1
goimports
2019-01-22 14:12:49 -08:00
Zac
160d68f29c
removed unecessary logs
2019-01-22 14:12:49 -08:00
Zac
6b8aac0b83
modularized and documented
2019-01-22 14:12:49 -08:00
Zac
e437d8e9a3
adding changes from previous PR, updated README
2019-01-22 14:12:49 -08:00
Zac
01f007a753
updated verbosity settings for POST request log
2019-01-22 14:12:49 -08:00
Zac
f8f555d73a
updated post request code
2019-01-22 14:12:49 -08:00
Zac
0eac8fc5cf
added some logs and moved where the post request is made
2019-01-22 14:12:49 -08:00
Zac
7f64d79bbe
Updated main to add the env var and send a post request
2019-01-22 14:12:49 -08:00
Thomas Jackson
b9c0ed3f5d
Update env vars based on comments
2019-01-22 13:41:45 -08:00
Thomas Jackson
088065e494
Normalize flag names to include `-file`
2019-01-22 13:41:45 -08:00
Thomas Jackson
933bbdfc1f
Add flag for ssh known hosts file
2019-01-22 13:41:45 -08:00
Thomas Jackson
c4c68e2620
Move SSH key path to a flag
2019-01-22 13:41:45 -08:00
Thomas Jackson
5573584fc6
Only allow -1 as "unlimited failures"
2019-01-18 09:08:50 -08:00
Thomas Jackson
ba3f44ca28
Add option to allow for unlimited failures
2019-01-17 16:01:49 -08:00
George Angel
a86ad5d950
add timeout tests
...
- custom `git` command option
- tests on slow running git commands
2019-01-04 22:32:53 +00:00
George Angel
cb8eac2b75
revert to original conditional format
2019-01-04 20:50:57 +00:00
George Angel
5a2584188f
fix context cancelling
2019-01-04 20:50:57 +00:00
George Angel
db07a432cd
Add a configurable timeout to the sync process
2019-01-04 20:50:57 +00:00
Tim Hockin
40e188fb26
Switch to rev-parse
...
This handles non-annotated tags, which were not handled well before. It
does mean that we use the hash of the (annotated) tag object instead of
the commit, but that seems OK.
Added a test case.
2018-11-09 10:16:36 -08:00
Tim Hockin
296093b9df
Clean up failed clones
...
If an initial clone crashes, it can leave the git-root in a bad state
such that git can't retry the clone. This change forces it to clean up
the mess and retry.
2018-08-21 08:04:45 -07:00
Tim Hockin
2e46b74cf8
Make the default checkout root be under HOME)
2018-08-08 11:37:19 -07:00
Bryce Cronkite-Ratcliff
ef9bc21b8f
Error if HTTP & SSH parameters provided
...
If both HTTP and SSH parameters are provided to the container on
startup, return an error to help users that have confused their
configurations.
2018-06-01 14:45:06 -07:00
Bryce Cronkite-Ratcliff
f69e8fb2c0
Add gitcookie configuration option
...
Add an option to specify a git http cookie file in the k8s yaml
that will be configured as the global git cookie file in the git-sync
client.
This is a useful access mechanism for some some hosted repositories
where SSH and passwords are not easily available, such as Google Cloud
Source Repositories.
2018-06-01 14:45:06 -07:00
Frank Farzan
c9f2e62ed3
Don't set GIT_SYNC_DEST in Dockerfile.
...
I'm guessing this is an artifact of previous refactorings.
Currently, GIT_SYNC_ROOT defaults to /git and GIT_SYNC_DEST
defaults to leaf dir of repo.
2018-02-05 19:21:13 -08:00
Pieter Lange
cdd6f09878
Flip the known_hosts enforcement to true so the git hosts actually gets verified
2017-09-16 01:28:04 +02:00
Tim Hockin
ac0817b212
Fix one-shot sync of a rev
2017-09-15 10:04:50 -07:00
Pieter Lange
899cf5974e
Add feature flag to enable ssh host key verification.
2017-04-25 00:34:01 +02:00
Pieter Lange
3b8bf0308c
Use secure defaults (check hostkeys)
2017-04-21 15:09:37 +02:00
Michael Grosser
cb9851e1b5
Revert "Update copyright notice"
...
This reverts commit b647219b69 .
2017-03-22 04:25:39 +00:00
Michael Grosser
b647219b69
Update copyright notice
2017-03-22 04:23:08 +00:00
ideahitme
b8cc35f4fc
clean up Dockerfile, remove ssh-wrapper.sh and set env var
2017-01-26 19:04:24 +01:00
fate-grand-order
fa78169d25
fix misspell "recommended" in main.go
2017-01-17 15:26:27 +08:00
Aman
ea98806bc9
Remove chmod command since we can specify permissions for Secret Volumes
...
- Fixed because of https://github.com/kubernetes/kubernetes/pull/28936
2016-12-19 21:55:34 +05:30
TerraTech
cf180e765b
main.go: Fixes git error: did you mean `--depth` (with two dashes ?)
2016-11-13 03:47:02 -05:00
Tim Hockin
70feeb5ae1
Use the go-build-template
...
Faster builds and versions from tags. Also use alpine as a base image. We
need alpine for other architectures...
Also change the --wait flag to take a float for sub-second waits.
2016-10-30 17:09:06 -07:00