(fix):Pass full context to S3 context handler (#2221)

On version 1.9.0 context fetch from S3 is broken since `url.Parse` requires full path: 90e426ba3f/pkg/util/bucket/bucket_util.go (L77)
Currently on a --context=s3://my-bucket/my-path/context.tar.gz we would pass only my-bucket/my-path/context.tar.gz which breaks context fetch

Closes #2200
This commit is contained in:
almg80 2022-09-08 18:08:51 +01:00 committed by GitHub
parent 76c0a8c1ec
commit f9aaa9fca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -50,9 +50,9 @@ func GetBuildContext(srcContext string, opts BuildOptions) (BuildContext, error)
switch prefix {
case constants.GCSBuildContextPrefix:
return &GCS{context: context}, nil
return &GCS{context: srcContext}, nil
case constants.S3BuildContextPrefix:
return &S3{context: context}, nil
return &S3{context: srcContext}, nil
case constants.LocalDirBuildContextPrefix:
return &Dir{context: context}, nil
case constants.GitBuildContextPrefix: