Documentation
¶
Index ¶
- func Copy(source, target string) error
- func DownloadArtifacts() error
- func DownloadDockerImages() error
- func MakeBucket() error
- func RemoveBucket() error
- func Sync(source, target string) error
- func UploadArtifacts() error
- func UploadDockerImages() error
- func UploadSingleArtifact(path string) error
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadArtifacts ¶
func DownloadArtifacts() error
DownloadArtifacts downloads all artifacts from s3 build bucket
func DownloadDockerImages ¶
func DownloadDockerImages() error
DownloadDockerImages fetches image archives from s3 bucket
func MakeBucket ¶
func MakeBucket() error
MakeBucket creates a bucket in s3 for the build (env.BuildNumber)
func Sync ¶
Sync syncs directories and S3 prefixes. Recursively copies new and updated files from the source directory to the destination.
func UploadArtifacts ¶
func UploadArtifacts() error
UploadArtifacts uploads all artifacts to s3 build bucket
func UploadDockerImages ¶
func UploadDockerImages() error
UploadDockerImages uploads all docker images to s3 build bucket
func UploadSingleArtifact ¶
UploadSingleArtifact uploads a single file to s3 build bucket
Types ¶
type Storage ¶
Storage wraps AWS S3 client, configures for s3.mysterium.network and provides convenience methods
func NewClient ¶
NewClient returns *s3.Client, configured to work with https://s3.mysterium.network storage
func (*Storage) FindObject ¶
func (s *Storage) FindObject(bucket string, predicate func(types.Object) bool) (*types.Object, error)
FindObject finds an object in storage bucket satisfying given predicate
func (*Storage) GetCacheableFile ¶
func (s *Storage) GetCacheableFile(bucket string, predicate func(types.Object) bool) (string, error)
GetCacheableFile finds a file in a storage bucket satisfying given predicate. If a local copy with the same size does not exist, downloads the file. Otherwise, returns a cached copy.