Commit Graph

612 Commits

Author SHA1 Message Date
Tim Hockin dcb918f846 WIP: startup tests 2021-03-29 16:48:50 -07:00
Kubernetes Prow Robot d89ac710a2
Merge pull request #362 from thockin/build-no-tty-v4
Don't require a TTY to build/test
2021-03-18 05:29:19 -07:00
Tim Hockin ac6f5036a2 Don't require a TTY to build/test 2021-03-17 22:02:32 -07:00
Kubernetes Prow Robot 7b594781f8
Merge pull request #344 from thockin/fix-pid1-exit-code-v4
Fix exit non-zero exit codes when running as pid1
2021-03-15 09:39:06 -07:00
Tim Hockin 45b28530a7 Fix exit non-zero exit codes when running as pid1
(v4 branch)

Prior to this we would swallow the exit code and always exit(0).
2021-03-15 09:28:26 -07:00
Kubernetes Prow Robot 03c87de032
Merge pull request #342 from thockin/add-git-configs-flag-4.x
Add --git-config flag
2021-03-15 09:27:06 -07:00
Tim Hockin 83b4dd21de Add --git-config flag
This allows arbitrary git configs to be passed in.  For example:

`git config --global http.postBuffer 1048576000`

`git config --global http.sslCAInfo /path/to/cert/file`

`git config --global http.sslVerify false`

This flag takes a comma-separated list of `key:val` pairs.  The key part
is passed to `git config` and must be a valid gitconfig section header
and variable name.  The val part can be either a quoted or unquoted
value.  For all values the following escape sequences are supported:
   * `\n` => [newline]
   * `\t` => [tab]
   * `\"` => `"`
   * `\,` => `,`
   * `\\` => `\`

Within unquoted values, commas MUST be escaped. Within quoted values,
commas MAY be escaped, but are not required to be.  Any other escape
sequence is an error.

Example:

`--git-config=foo.one:val1,foo.two:"quoted val",foo.three:12345`

This commit exposed a bug in runCommand() which modified its args when
they had an embedded space.
2021-03-15 09:20:02 -07:00
Kubernetes Prow Robot 6f5c1a9a22
Merge pull request #353 from thockin/fix-v4-tests
Fix tests on master - reset needs "--" arg
2021-03-15 09:17:05 -07:00
Tim Hockin cc094858b3 Fix tests on master - reset needs "--" arg
Now that the worktree dirs are the same name as the hash, `git reset`
doesn't know if we are asking for reset-to-hash or reset-the-dir.
Adding "--" makes that unambiguous.

Tests pass now.
2021-03-15 08:59:34 -07:00
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