diff --git a/.drone.star b/.drone.star index 19e90d354d7..1d403e0fc5c 100644 --- a/.drone.star +++ b/.drone.star @@ -1,7 +1,7 @@ def main(ctx): before = [ testing(ctx), - apiTests(ctx), + apiTests(ctx, 'master', '158bd976047ea8abd137e2c61905d9dd63dc977d'), ] stages = [ @@ -23,7 +23,7 @@ def main(ctx): return before + stages + after -def apiTests(ctx): +def apiTests(ctx, coreBranch = 'master', coreCommit = ''): return { 'kind': 'pipeline', 'type': 'docker', @@ -100,19 +100,22 @@ def apiTests(ctx): 'TEST_OCIS':'true', 'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/reva/', 'SKELETON_DIR': '/srv/app/tmp/testing/data/apiSkeleton' - }, - 'commands': [ - 'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/tmp/testing', - 'git clone -b master --depth=1 https://github.com/owncloud/core.git /srv/app/testrunner', - 'cd /srv/app/testrunner', - 'make test-acceptance-api' - ], - 'volumes': [ - { - 'name': 'gopath', - 'path': '/srv/app', - }, - ] + }, + 'commands': [ + '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) + ] if coreCommit != '' else []) + [ + 'make test-acceptance-api' + ], + 'volumes': [ + { + 'name': 'gopath', + 'path': '/srv/app', + }, + ] }, ], 'services': [ @@ -320,7 +323,7 @@ def testing(ctx): 'LITMUS_USERNAME': 'tu1', 'LITMUS_PASSWORD': '1234', 'TESTS': 'basic http copymove props' - }, + }, }, ], 'services': [ @@ -334,7 +337,7 @@ def testing(ctx): 'LDAP_ADMIN_PASSWORD': 'admin', 'LDAP_TLS_VERIFY_CLIENT': 'never', 'HOSTNAME': 'ldap' - }, + }, }, { 'name': 'redis', @@ -342,7 +345,7 @@ def testing(ctx): 'pull': 'always', 'environment': { 'REDIS_DATABASES': 1 - }, + }, }, ], 'volumes': [