github.com/abayer/test-infra@v0.0.5/prow/cmd/gcsupload/README.md (about)

     1  # `gcsupload`
     2  
     3  `gcsupload` uploads artifacts to cloud storage at a path resolved from the job configuration.
     4  
     5  `gcsupload` can be configured by either passing in flags or by specifying a full set of options
     6  as JSON in the `$GCSUPLOAD_OPTIONS` environment variable, which has the following form:
     7  
     8  ```json
     9  {
    10      "bucket": "kubernetes-jenkins",
    11      "sub_dir": "",
    12      "items": [
    13          "/logs/artifacts/"
    14      ],
    15      "path_strategy": "legacy",
    16      "default_org": "kubernetes",
    17      "default_repo": "kubernetes",
    18      "gcs_credentials_file": "/secrets/gcs/service-account.json",
    19      "dry_run": "false"
    20  }
    21  ```
    22  
    23  In addition to this configuration for the tool, the `$JOB_SPEC` environment variable should be
    24  present to provide the contents of the Prow downward API for jobs. This data is used to resolve
    25  the exact location in GCS to which artifacts and logs will be pushed.
    26  
    27  The path strategy field can be one of `"legacy"`, `"single"`, and `"explicit"`. This field
    28  determines how the organization and repository of the code under test is encoded into the GCS path
    29  for the test artifacts:
    30  
    31  | Strategy     | Encoding                                                                                                                   |
    32  | ------------ | -------------------------------------------------------------------------------------------------------------------------- |
    33  | `"legacy"`   | `""` for the default org and repo, `"org"` for non-default repos in the default org, `"org_repo"` for repos in other orgs. |
    34  | `"single"`   | `""` for the default org and repo, `"org_repo"` for all other repos.                                                       |
    35  | `"explicit"` | `"org_repo"` for all repos.                                                                                                |
    36  
    37  For historical reasons, the `"legacy"` or `"single"` strategies may already be in use for some;
    38  however, for new deployments it is strongly advised to use the `"explicit"` strategy.