Documentation ¶
Overview ¶
Package gsutil provides helper functions for running gsutil commands with Docker.
Index ¶
- type DockerFlags
- type Helper
- type RealHelper
- func (g RealHelper) UploadArtifacts(ctx context.Context, flags DockerFlags, src, dest string) ([]*pb.ArtifactResult, error)
- func (g RealHelper) UploadArtifactsManifest(ctx context.Context, flags DockerFlags, manifest, bucket string, ...) (string, error)
- func (g RealHelper) VerifyBucket(ctx context.Context, bucket string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerFlags ¶
DockerFlags holds information relevant to docker run invocations.
type Helper ¶
type Helper interface { VerifyBucket(ctx context.Context, bucket string) error UploadArtifacts(ctx context.Context, flags DockerFlags, src, dest string) ([]*pb.ArtifactResult, error) UploadArtifactsManifest(ctx context.Context, flags DockerFlags, manifest, bucket string, results []*pb.ArtifactResult) (string, error) }
Helper is a mockable interface for running gsutil commands in docker.
type RealHelper ¶
type RealHelper struct {
// contains filtered or unexported fields
}
RealHelper provides helper functions that actual run gsutil commands in docker.
func (RealHelper) UploadArtifacts ¶
func (g RealHelper) UploadArtifacts(ctx context.Context, flags DockerFlags, src, dest string) ([]*pb.ArtifactResult, error)
UploadArtifacts copies artifacts from the project workspace source to a GCS bucket. Returns the GCS path of the artifact manifest file and the number of artifacts uploaded.
func (RealHelper) UploadArtifactsManifest ¶
func (g RealHelper) UploadArtifactsManifest(ctx context.Context, flags DockerFlags, manifest, bucket string, results []*pb.ArtifactResult) (string, error)
func (RealHelper) VerifyBucket ¶
func (g RealHelper) VerifyBucket(ctx context.Context, bucket string) error
VerifyBucket returns nil if the bucket exists, otherwise an error.
Click to show internal directories.
Click to hide internal directories.