This commit is contained in:
Florian Schade
2020-12-03 11:52:46 +01:00
parent 89f50668f9
commit a3d1e55d29

View File

@@ -123,6 +123,7 @@ def main(ctx):
before = \
[ buildOcisBinaryForTesting(ctx) ] + \
[benchmark(ctx)] + \
testOcisModules(ctx) + \
testPipelines(ctx)
@@ -138,7 +139,7 @@ def main(ctx):
]
purge = purgeBuildArtifactCache(ctx, 'ocis-binary-amd64')
purge['depends_on'] = getPipelineNames(testPipelines(ctx))
purge['depends_on'] = getPipelineNames(testPipelines(ctx) + [benchmark(ctx)])
after = [
manifest(ctx),
@@ -525,6 +526,51 @@ def coreApiTests(ctx, coreBranch = 'master', coreCommit = '', part_number = 1, n
},
}
def benchmark(ctx):
return {
'kind': 'pipeline',
'type': 'docker',
'name': 'benchmark',
'platform': {
'os': 'linux',
'arch': 'amd64',
},
'steps':
restoreBuildArtifactCache(ctx, 'ocis-binary-amd64', 'ocis/bin/ocis') +
ocisServer('ocis') + [
{
'name': 'build benchmarks',
'image': 'node',
'pull': 'always',
'commands': [
'cd tests/k6',
'yarn',
'yarn build',
],
},
{
'name': 'run benchmarks',
'image': 'loadimpact/k6',
'pull': 'always',
'environment': {
'OC_HOST': 'https://ocis-server:9200',
},
'commands': [
'cd tests/k6',
'for f in ./dist/test-* ; do k6 run "$f" ; done',
],
},
],
'depends_on': getPipelineNames([buildOcisBinaryForTesting(ctx)]),
'trigger': {
'ref': [
'refs/heads/master',
'refs/tags/v*',
'refs/pull/**',
],
},
}
def uiTests(ctx, phoenixBranch, phoenixCommit):
suiteNames = config['uiTests']['suites'].keys()
return [uiTestPipeline(ctx, suiteName, phoenixBranch, phoenixCommit) for suiteName in suiteNames]