github.com/abayer/test-infra@v0.0.5/prow/cmd/clonerefs/README.md (about) 1 # `clonerefs` 2 3 `clonerefs` clones code under test at the specified locations. Regardless of the success or failure 4 of clone operations, this utility will have an exit code of `0` and will record the clone operation 5 status to the specified log file. Clone records have the form: 6 7 ```json 8 [ 9 { 10 "failed": false, 11 "refs": { 12 "org": "kubernetes", 13 "repo": "kubernetes", 14 "base_ref": "master", 15 "base_sha": "a36820b10cde020818b8dd437e285d0e2e7d5e98", 16 "pulls": [ 17 { 18 "number": 123, 19 "author": "smarterclayton", 20 "sha": "2b58234a8aee0d55918b158a3b38c292d6a95ef7" 21 } 22 ] 23 }, 24 "commands": [ 25 { 26 "command": "git init", 27 "output": "Reinitialized existing Git repository in /go/src/k8s.io/kubernetes/.git/", 28 "error": "" 29 } 30 ] 31 } 32 ] 33 ``` 34 35 Note: the utility _will_ exit with a non-zero status if a fatal error is detected and no clone 36 operations can even begin to run. 37 38 This utility is intended to be used with [`initupload`](./../initupload/README.md), which will 39 decode the JSON output by `clonerefs` and can format it for human consumption. 40 41 `clonerefs` can be configured by either passing in flags or by specifying a full set of options 42 as JSON in the `$CLONEREFS_OPTIONS` environment variable, which has the form: 43 44 ```json 45 { 46 "src_root": "/go", 47 "log": "/logs/clone-log.txt", 48 "git_user_name": "ci-robot", 49 "git_user_email": "ci-robot@k8s.io", 50 "refs": [ 51 { 52 "org": "kubernetes", 53 "repo": "kubernetes", 54 "base_ref": "master", 55 "base_sha": "a36820b10cde020818b8dd437e285d0e2e7d5e98", 56 "pulls": [ 57 { 58 "number": 123, 59 "author": "smarterclayton", 60 "sha": "2b58234a8aee0d55918b158a3b38c292d6a95ef7" 61 } 62 ] 63 } 64 ] 65 } 66 ```