Commit Graph

653 Commits

Author SHA1 Message Date
Kubernetes Prow Robot d02bcce8e5
Merge pull request #351 from thockin/readlink-is-api-v4
Change the symlink targets to just the SHA (v4)
2021-03-12 02:58:17 -08:00
Kubernetes Prow Robot aab6380c0d
Merge pull request #349 from thockin/build-no-cache-v4
Build container without cache
2021-03-12 02:56:17 -08:00
Kubernetes Prow Robot a8660c02bf
Merge pull request #347 from thockin/update-git-v4
Update git from backports
2021-03-12 02:54:17 -08:00
Tim Hockin e5a438e446 Change the symlink targets to just the SHA
This allows users to call readlink() on the link and learn the current
checked out SHA.
2021-03-11 22:11:35 -08:00
Tim Hockin 813337fe2d Update git from backports
Some bugs have been fixed that impact some users.
2021-03-11 22:11:35 -08:00
Tim Hockin a082bf83cf Build container without cache 2021-03-11 19:25:01 -08:00
Tim Hockin 858cc8d735 Update git from backports
Some bugs have been fixed that impact some users.
2021-03-11 19:23:13 -08:00
Kubernetes Prow Robot 45852714fc
Merge pull request #336 from justaugustus/image
Makefile: Update base and build images
2021-02-12 11:01:59 -08:00
Stephen Augustus 35507943ce Makefile: Update base and build images
- base: debian-base:v2.0.0 --> debian-base:buster-v1.4.0
- build: golang:1.14-alpine --> golang:1.15-alpine

Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-02-12 12:15:59 -05:00
Kubernetes Prow Robot 14b9f07f58
Merge pull request #332 from thockin/v4-e2e-use-docker-nc
Use docker to run helper servers in e2e
2021-02-03 03:02:29 -08:00
Tim Hockin ccde597b7d Always specify branch name in e2e
As git changes the default from "master" to "main", it's not
predictable.  Now the test owns the decision.

This was already merged on release-3.x.
2021-01-23 16:13:26 -08:00
Tim Hockin a285a770e2 Use docker to run helper servers in e2e
Reliably cleaning up leftover things like `nc` processes is surprisingly
difficult in pure shell.  e2e passes on the master branch now.
2021-01-23 15:59:24 -08:00
Kubernetes Prow Robot 75bfc00fb6
Merge pull request #330 from thockin/v4-container-mkdir
Default the git-sync root dir in container
2021-01-22 04:35:27 -08:00
Tim Hockin b6a1c61e83 Default the git-sync root dir in container
This should make the container image easier to use, without defaulting
the root dir in non-container usage.
2021-01-21 12:37:07 -08:00
Tim Hockin 02d291c495 Set HOME in Dockerfile
Clean up other comments, too.
2021-01-21 12:37:07 -08:00
Kubernetes Prow Robot e52396c9fd
Merge pull request #328 from thockin/pod-yaml-doc
Add an example pod YAML
2021-01-21 01:55:03 -08:00
Tim Hockin 08fbf383f8 Add an example pod YAML 2021-01-20 16:28:57 -08:00
Kubernetes Prow Robot 6f8ecc6caa
Merge pull request #323 from thockin/log-uid-gid
Log info about UID, GID, and HOME for debug
2021-01-07 05:59:45 -08:00
Kubernetes Prow Robot 6f3d9e4e16
Merge pull request #322 from thockin/parse-int
Allow octal and hex values for int flags
2021-01-07 05:57:46 -08:00
Tim Hockin e2bc4c3ea0 Log info about UID, GID, and HOME for debug 2021-01-06 13:52:08 -08:00
Tim Hockin e7eecc31a1 Allow octal and hex values for int flags
This is specifcally relevant to --change-permissions.
2021-01-06 13:46:25 -08:00
Kubernetes Prow Robot b631e42946
Merge pull request #318 from thockin/master
Change CONTRIBUTING.md to CNCF CLA
2020-12-23 11:30:27 -08:00
Tim Hockin 1c1f52f437 Change CONTRIBUTING.md to CNCF CLA 2020-12-23 10:59:38 -08:00
Kubernetes Prow Robot 22f69061ff
Merge pull request #307 from haiyanmeng/doc
Add the `--root` flag into the Usage section
2020-11-17 22:06:05 -08:00
Haiyan Meng 0010dafe6d Add the `--root` flag into the Usage section 2020-11-17 18:44:35 -08:00
Kubernetes Prow Robot 14b9e286f0
Merge pull request #304 from thockin/5-main-struct
Add a "main struct" with methods
2020-11-13 04:48:24 -08:00
Tim Hockin c410bb5610 Add a main struct, part 8
This commit encapsulates the authURL parameter.
2020-11-10 10:21:20 -08:00
Tim Hockin 4d808d47ed Add a main struct, part 7
This commit encapsulates the chmod and link parameters.
2020-11-10 10:21:20 -08:00
Tim Hockin 70dd821e7b Add a main struct, part 6
This commit encapsulates the submodules parameter.
2020-11-10 10:21:20 -08:00
Tim Hockin 8b321e3940 Add a main struct, part 5
This commit encapsulates the depth parameter.
2020-11-10 10:21:20 -08:00
Tim Hockin 3a1212da36 Add a main struct, part 4
This commit encapsulates the branch and rev parameters.
2020-11-10 10:21:20 -08:00
Tim Hockin b44dab6817 Add a main struct, part 3
This commit encapsulates the repo parameter.
2020-11-10 10:21:20 -08:00
Tim Hockin a80afb427d Add a main struct, part 2
This commit encapsulates the root parameter.

This exposed a bug where we do not reset the root of the workspace.
2020-11-10 10:21:20 -08:00
Tim Hockin 2dd4705c1b Add a main struct, part 1
Start the process of encapsulating most of the flags and not using them
as global variables.  This commit JUST does the git command flag, which
is now only accessed from main()
2020-11-10 10:21:20 -08:00
Kubernetes Prow Robot 073b007ebd
Merge pull request #303 from thockin/4-printf-vs-logs
Clarify logging vs printf for fatal messages
2020-11-10 09:30:40 -08:00
Tim Hockin 047593b40a Clarify logging vs printf for fatal messages
Also log when HTTP serving fails.
2020-11-10 09:15:17 -08:00
Kubernetes Prow Robot 341ebd2c1a
Merge pull request #302 from thockin/3-normlize-root-path
Normalize the root path
2020-11-10 05:16:39 -08:00
Tim Hockin 24c06a5b48 Normalize the root path
This makes sure there's never any confusion about whether it is an
absolute path or has symlinks or whatever.  Add e2e cases to cover.
2020-11-09 09:20:24 -08:00
Kubernetes Prow Robot 93e74c2527
Merge pull request #305 from thockin/v4-breakings
Add a test for tabs in manual
2020-11-09 08:58:30 -08:00
Tim Hockin ea469c1ed4 Add a test for tabs in manual 2020-11-09 08:53:29 -08:00
Kubernetes Prow Robot 719a93d431
Merge pull request #300 from thockin/v4-breakings
Change some flags (breaking)
2020-11-09 08:44:26 -08:00
Tim Hockin a2fa689296 Fix SSH docs to use 2 dashes 2020-11-09 08:36:14 -08:00
Tim Hockin 0e802450ee Don't allow --dest to start with a dot
BREAKING CHANGE

It's useful to reserve names that start with a dot.
2020-11-09 08:36:10 -08:00
Tim Hockin af2ae5b533 Make the --root flag required, no default
BREAKING CHANGE

The default of $HOME has caused problems for people playing with
git-sync, so this change makes it a required argument.
2020-11-09 08:30:29 -08:00
Kubernetes Prow Robot 7636966819
Merge pull request #301 from thockin/2-env-tests
Add tests for other env funcs
2020-11-09 05:26:26 -08:00
Tim Hockin 7d7cbdacff Add tests for other env funcs 2020-11-08 10:47:07 -08:00
Kubernetes Prow Robot 69f3e090c2
Merge pull request #299 from thockin/time-flags
Change time-related flags to durations
2020-11-06 00:58:51 -08:00
Tim Hockin fa0e8696e2 Change time-related flags to durations
Add '--period' to replace '--wait', which is now obsolete.

Add '--sync-timeout' to replace '--timeout', which is now obsolete.

Both of these new flags take a Go-style time string, rather than a bare
number. For example "1s" for 1 second or "1m" for one minute.

The old flags have been kept and will take precedence if specified.
2020-11-05 16:46:09 -08:00
Kubernetes Prow Robot b0eebbc7ad
Merge pull request #298 from thockin/flags
Add help and manual flags, use pflag
2020-11-05 03:00:53 -08:00
Tim Hockin 20696689f3 Add help and manual flags, use pflag
THIS IS A BREAKING CHANGE

Switch flags implementation to use pflag.  This means that long flags
like `-username` must now use 2 dashes: `--username`.

The `-v` flag (verbose) used to accept `-v` or `--v`.  Now it only
accepts `-v.

The `--help` and `-h` flags are new.

The `--man` flag is new (print a man-page like help message).

Several glog flags which used to be exposed (e.g. --logtostderr) are no
longer exposed.  Logs always go to stderr.
2020-10-31 00:50:51 -07:00