Skip to content
Snippets Groups Projects

Introduce GCS adapter for remote cache

Merged Tomasz Maczukin requested to merge introduce-gcs-cache-support into master
10 files
+ 199
244
Compare changes
  • Side-by-side
  • Inline
Files
10
@@ -27,13 +27,13 @@ var NewSignedURLGenerator = func() SignedURLGenerator {
}
type Adapter struct {
build *common.Build
timeout time.Duration
config *common.CacheConfig
objectName string
}
func (a *Adapter) SetBuild(build *common.Build) {
a.build = build
func (a *Adapter) SetTimeout(timeout time.Duration) {
a.timeout = timeout
}
func (a *Adapter) SetConfig(config *common.CacheConfig) {
@@ -83,7 +83,7 @@ func (a *Adapter) getGCSURL(method string, contentType string) (URL *url.URL) {
GoogleAccessID: credentials.AccessID,
PrivateKey: privateKey,
Method: method,
Expires: time.Now().Add(time.Duration(a.build.RunnerInfo.Timeout) * time.Second),
Expires: time.Now().Add(a.timeout),
ContentType: contentType,
})
if err != nil {
Loading