Skip to content

Commit 5aafbac

Browse files
author
Matthew Fisher
committed
fix(create-bucket): set BUCKET_NAME for swift
1 parent 86f06d7 commit 5aafbac

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ func main() {
136136
log.Fatal(err)
137137
} else {
138138
os.Setenv("REGISTRY_STORAGE_SWIFT_CONTAINER", string(container))
139+
os.Setenv("BUCKET_NAME", string(container))
139140
}
140141

141142
if authVersion, err := ioutil.ReadFile("/var/run/secrets/deis/registry/creds/authversion"); err != nil {

rootfs/bin/create-bucket

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ elif os.getenv('REGISTRY_STORAGE') == "swift":
5353
tenant_name=os.getenv('REGISTRY_STORAGE_SWIFT_TENANT')
5454
)
5555
# swift also does not throw exception if container already exists.
56-
conn.put_container(os.getenv('BUCKET_NAME'))
56+
conn.put_container(bucket_name)
5757

5858
elif os.getenv('REGISTRY_STORAGE') == "s3" and os.getenv('REGISTRY_STORAGE_S3_BACKEND') == 'minio':
5959
botoconfig.add_section('s3')

0 commit comments

Comments
 (0)