Skip to content

Commit

Permalink
Merge pull request #1062 from owncloud/fix_testing_upload_to_download…
Browse files Browse the repository at this point in the history
…_mirror

[docs-only] fix testing uploads
  • Loading branch information
phil-davis authored Dec 11, 2020
2 parents e8d9b43 + e1a0839 commit 67f727d
Showing 1 changed file with 24 additions and 37 deletions.
61 changes: 24 additions & 37 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -907,44 +907,31 @@ def dockerEos(ctx):
}

def binary(ctx, name):
# uploads binary to https://download.owncloud.com/ocis/ocis/testing/
target = '/ocis/%s/testing' % (ctx.repo.name.replace("ocis-", ""))
if ctx.build.event == "tag":
settings = {
'endpoint': {
'from_secret': 's3_endpoint',
},
'access_key': {
'from_secret': 'aws_access_key_id',
},
'secret_key': {
'from_secret': 'aws_secret_access_key',
},
'bucket': {
'from_secret': 's3_bucket',
},
'path_style': True,
'strip_prefix': 'ocis/dist/release/',
'source': 'ocis/dist/release/*',
'target': '/ocis/%s/%s' % (ctx.repo.name.replace("ocis-", ""), ctx.build.ref.replace("refs/tags/v", "")),
}
else:
settings = {
'endpoint': {
'from_secret': 's3_endpoint',
},
'access_key': {
'from_secret': 'aws_access_key_id',
},
'secret_key': {
'from_secret': 'aws_secret_access_key',
},
'bucket': {
'from_secret': 's3_bucket',
},
'path_style': True,
'strip_prefix': 'dist/release/',
'source': 'ocis/dist/release/*',
'target': '/ocis/%s/testing' % (ctx.repo.name.replace("ocis-", "")),
}
# uploads binary to eg. https://download.owncloud.com/ocis/ocis/1.0.0-beta9/
target = '/ocis/%s/%s' % (ctx.repo.name.replace("ocis-", ""), ctx.build.ref.replace("refs/tags/v", ""))

settings = {
'endpoint': {
'from_secret': 's3_endpoint',
},
'access_key': {
'from_secret': 'aws_access_key_id',
},
'secret_key': {
'from_secret': 'aws_secret_access_key',
},
'bucket': {
'from_secret': 's3_bucket',
},
'path_style': True,
'strip_prefix': 'ocis/dist/release/',
'source': 'ocis/dist/release/*',
'target': target,
}


return {
'kind': 'pipeline',
Expand Down

0 comments on commit 67f727d

Please sign in to comment.