From e1a0839c6eca5ee50ff4978e328ce5fd4366ddd9 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Fri, 11 Dec 2020 11:15:38 +0100 Subject: [PATCH] fix testing uploads --- .drone.star | 61 +++++++++++++++++++++-------------------------------- 1 file changed, 24 insertions(+), 37 deletions(-) diff --git a/.drone.star b/.drone.star index 02a3f82e642..419f9900320 100644 --- a/.drone.star +++ b/.drone.star @@ -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',