Skip to content

Commit

Permalink
Merge pull request #169 from owncloud/update-drone-star
Browse files Browse the repository at this point in the history
[Tests-Only][CI] Update drone.star file to the latest version from activity app
  • Loading branch information
phil-davis authored Jun 8, 2021
2 parents 51430a3 + a844042 commit d617f99
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ config = {
}

def main(ctx):

before = beforePipelines()

coverageTests = coveragePipelines(ctx)
Expand Down Expand Up @@ -460,6 +461,7 @@ def javascript(ctx):
'extraEnvironment': {},
'extraCommandsBeforeTestRun': [],
'extraTeardown': [],
'skip': False
}

if 'defaults' in config:
Expand All @@ -480,6 +482,9 @@ def javascript(ctx):
for item in default:
params[item] = matrix[item] if item in matrix else default[item]

if params['skip']:
return pipelines

result = {
'kind': 'pipeline',
'type': 'docker',
Expand Down Expand Up @@ -566,6 +571,7 @@ def phpTests(ctx, testType):
'extraCommandsBeforeTestRun': [],
'extraApps': {},
'extraTeardown': [],
'skip': False
}

if 'defaults' in config:
Expand All @@ -591,6 +597,9 @@ def phpTests(ctx, testType):
for item in default:
params[item] = matrix[item] if item in matrix else default[item]

if params['skip']:
continue

cephS3Params = params['cephS3']
if type(cephS3Params) == "bool":
cephS3Needed = cephS3Params
Expand Down Expand Up @@ -760,6 +769,9 @@ def acceptance(ctx):
'numberOfParts': 1,
'cron': '',
'pullRequestAndCron': 'nightly',
'skip': False,
'debugSuites': [],
'skipExceptParts': []
}

if 'defaults' in config:
Expand All @@ -774,6 +786,14 @@ def acceptance(ctx):
suites[suite] = suite
else:
suites = matrix['suites']

if 'debugSuites' in matrix and len(matrix['debugSuites']) != 0:
if type(matrix['debugSuites']) == "list":
suites = {}
for suite in matrix['debugSuites']:
suites[suite] = suite
else:
suites = matrix['debugSuites']

for suite, alternateSuiteName in suites.items():
isWebUI = suite.startswith('webUI')
Expand All @@ -784,6 +804,9 @@ def acceptance(ctx):
for item in default:
params[item] = matrix[item] if item in matrix else default[item]

if params['skip']:
continue

if isAPI or isCLI:
params['browsers'] = ['']

Expand Down Expand Up @@ -813,6 +836,10 @@ def acceptance(ctx):
params['extraApps'] = extraAppsDict

for testConfig in buildTestConfig(params):
debugPartsEnabled = (len(testConfig['skipExceptParts']) != 0)
if debugPartsEnabled and testConfig['runPart'] not in testConfig['skipExceptParts']:
continue

name = 'unknown'
if isWebUI or isAPI or isCLI:
esString = '-es' + testConfig['esVersion'] if testConfig['esVersion'] != 'none' else ''
Expand Down Expand Up @@ -1226,11 +1253,13 @@ def owncloudService(version, phpVersion, name = 'server', path = '/var/www/owncl
'APACHE_CONFIG_TEMPLATE': 'ssl',
'APACHE_SSL_CERT_CN': 'server',
'APACHE_SSL_CERT': '/var/www/owncloud/%s.crt' % name,
'APACHE_SSL_KEY': '/var/www/owncloud/%s.key' % name
'APACHE_SSL_KEY': '/var/www/owncloud/%s.key' % name,
'APACHE_LOGGING_PATH': '/dev/null',
}
else:
environment = {
'APACHE_WEBROOT': path
'APACHE_WEBROOT': path,
'APACHE_LOGGING_PATH': '/dev/null',
}

return [{
Expand Down

0 comments on commit d617f99

Please sign in to comment.