github.com/yrj2011/jx-test-infra@v0.0.0-20190529031832-7a2065ee98eb/prow/cmd/sidecar/README.md (about) 1 # `sidecar` 2 3 `sidecar` watches disk for files containing a the `std{out,err}` output from a process as well as 4 its exit code; when the exit code has been written, this utility uploads a status object, the logs 5 from the process and any other specified artifacts to cloud storage. The utility will exit with the 6 exit code of the wrapped process or otherwise non-zero if the utility has a fatal error. 7 8 This utility is intended to be used with [`entrypoint`](./../entrypoint/README.md), which will 9 write the files watched by this utility. 10 11 `sidecar` can be configured by either passing in flags or by specifying a full set of options 12 as JSON in the `$SIDECAR_OPTIONS` environment variable, which has the same form as that for 13 `gcsupload`, plus the `"process_log"` and `"marker_file"` fields. See 14 [that documentation](./../gcsupload/README.md) for an explanation. 15 16 ```json 17 { 18 "wrapper_options": { 19 "process_log": "/logs/process-log.txt", 20 "marker_file": "/logs/marker-file.txt" 21 }, 22 "gcs_options": { 23 "bucket": "kubernetes-jenkins", 24 "sub_dir": "", 25 "items": [ 26 "/logs/artifacts/" 27 ], 28 "path_strategy": "legacy", 29 "default_org": "kubernetes", 30 "default_repo": "kubernetes", 31 "gcs_credentials_file": "/secrets/gcs/service-account.json", 32 "dry_run": "false" 33 } 34 } 35 ``` 36 37 In addition to this configuration for the tool, the `$JOB_SPEC` environment variable should be 38 present to provide the contents of the Prow downward API for jobs. This data is used to resolve 39 the exact location in GCS to which artifacts and logs will be pushed.