getter: allow the gcs download scheme (#6692)

This commit is contained in:
Lang Martin 2019-11-19 09:10:56 -05:00 committed by GitHub
parent be040f85f5
commit aa985ebe21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -18,7 +18,7 @@ var (
lock sync.Mutex
// supported is the set of download schemes supported by Nomad
supported = []string{"http", "https", "s3", "hg", "git"}
supported = []string{"http", "https", "s3", "hg", "git", "gcs"}
)
const (

View File

@ -342,6 +342,13 @@ func TestGetGetterUrl_Queries(t *testing.T) {
},
output: "bucket.s3-eu-west-1.amazonaws.com/foo/bar?aws_access_key_id=abcd1234",
},
{
name: "gcs",
artifact: &structs.TaskArtifact{
GetterSource: "gcs::https://www.googleapis.com/storage/v1/b/d/f",
},
output: "gcs::https://www.googleapis.com/storage/v1/b/d/f",
},
{
name: "local file",
artifact: &structs.TaskArtifact{