Only checkout a commit if it is specified

This commit is contained in:
Phil Davis
2020-06-15 17:07:40 +05:45
parent 0f7cc3bf25
commit 557015de68

View File

@@ -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': [