Skip to content

Support pushing files? #12

Description

@dougthor42

Is your feature request related to a problem? Please describe.

Downloading stuff from GCS is great, but what about uploading?

Describe the solution you'd like

pkg_tar(
    name = "foo",
    ...,
)

# bazel run //path/to:push_tarball
gcs_push(
    name = "push_tarball",
    file = ":foo",
    ...,
)

Describe alternatives you've considered

We'll be writing a sh_binary:

Untested example:

sh_binary(
    name = "push_tarball",
    srcs = ["push_to_gcs.sh"],
    data = [":foo"],
    deps = ["//:gcloud_binary"],
    args = ["$(location :foo)"],
)
#!/bin/bash
# push_to_gcs.sh
gcloud storage cp $1 gs://foo/bar/

We could also use a genrule, but the sh_binary is probably better.

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions