Skip to content

Commit

Permalink
(fix):Pass full context to S3 context handler (#2221)
Browse files Browse the repository at this point in the history
On version 1.9.0 context fetch from S3 is broken since `url.Parse` requires full path: https://github.com/GoogleContainerTools/kaniko/blob/90e426ba3fde4b72efbcec5f10e4f73963313228/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
  • Loading branch information
almg80 authored Sep 8, 2022
1 parent 76c0a8c commit f9aaa9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/buildcontext/buildcontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f9aaa9f

Please sign in to comment.