mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-17 23:59:11 +02:00
Merge pull request #321 from daniel-harrison/master
Enable shared config for s3
This commit is contained in:
@@ -35,7 +35,13 @@ type S3 struct {
|
||||
// UnpackTarFromBuildContext download and untar a file from s3
|
||||
func (s *S3) UnpackTarFromBuildContext() (string, error) {
|
||||
bucket, item := util.GetBucketAndItem(s.context)
|
||||
downloader := s3manager.NewDownloader(session.New())
|
||||
sess, err := session.NewSessionWithOptions(session.Options{
|
||||
SharedConfigState: session.SharedConfigEnable,
|
||||
})
|
||||
if err != nil {
|
||||
return bucket, err
|
||||
}
|
||||
downloader := s3manager.NewDownloader(sess)
|
||||
directory := constants.BuildContextDir
|
||||
tarPath := filepath.Join(directory, constants.ContextTar)
|
||||
if err := os.MkdirAll(directory, 0750); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user