From 557015de68ea46f9820c642e33d167f186d2858d Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 15 Jun 2020 17:07:40 +0545 Subject: [PATCH] Only checkout a commit if it is specified --- .drone.star | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.drone.star b/.drone.star index e445a985e..1d403e0fc 100644 --- a/.drone.star +++ b/.drone.star @@ -23,7 +23,7 @@ def main(ctx): return before + stages + after -def apiTests(ctx, coreBranch, coreCommit): +def apiTests(ctx, coreBranch = 'master', coreCommit = ''): return { 'kind': 'pipeline', 'type': 'docker', @@ -105,7 +105,9 @@ def apiTests(ctx, coreBranch, coreCommit): 'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/tmp/testing', 'git clone -b %s --single-branch --no-tags https://github.com/owncloud/core.git /srv/app/testrunner' % (coreBranch), 'cd /srv/app/testrunner', - 'git checkout %s' % (coreCommit), + ] + ([ + 'git checkout %s' % (coreCommit) + ] if coreCommit != '' else []) + [ 'make test-acceptance-api' ], 'volumes': [