forked from byzer-org/byzer-lang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
56 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
import oss2 | ||
import os | ||
|
||
if not os.environ['AK']: | ||
raise ValueError('AK and AKS should be configured') | ||
|
||
if not os.environ['MLSQL_RELEASE_TAR']: | ||
raise ValueError('MLSQL_RELEASE_TAR should be configured') | ||
|
||
fileName = os.environ['MLSQL_RELEASE_TAR'] | ||
|
||
auth = oss2.Auth(os.environ['AK'], os.environ['AKS']) | ||
# Endpoint以杭州为例,其它Region请按实际情况填写。 | ||
bucket = oss2.Bucket(auth, 'http://oss-cn-hangzhou.aliyuncs.com', 'mlsql-release-repo') | ||
|
||
bucket.create_bucket(oss2.models.BUCKET_ACL_PRIVATE) | ||
|
||
bucket.put_object_from_file(fileName.split("/")[-1], fileName) | ||
|
||
print("success uploaded") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters