From bb99f44a356b141e3763955a5142fbb945bee085 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Thu, 3 Dec 2020 13:20:45 +0100 Subject: [PATCH] fix drone definition --- .drone.star | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.drone.star b/.drone.star index f2002f72d4..59ae33231f 100644 --- a/.drone.star +++ b/.drone.star @@ -137,9 +137,6 @@ def main(ctx): releaseSubmodule(ctx), ] - purge = purgeBuildArtifactCache(ctx, 'ocis-binary-amd64') - purge['depends_on'] = getPipelineNames(testPipelines(ctx) + [benchmark(ctx)]) - after = [ manifest(ctx), changelog(ctx), @@ -147,11 +144,16 @@ def main(ctx): badges(ctx), docs(ctx), updateDeployment(ctx), - purge, ] if ctx.build.event == "cron": before.append(benchmark(ctx)) + + purge = purgeBuildArtifactCache(ctx, 'ocis-binary-amd64') + purge['depends_on'] = getPipelineNames(before) + + before.append(purge) + notify_pipeline = notify(ctx) notify_pipeline['depends_on'] = \ getPipelineNames(before) @@ -174,11 +176,17 @@ def main(ctx): pipelines = docs_pipelines + [ notify_pipeline ] - elif '[with-benchmarks]' in (ctx.build.title + ctx.build.message): - before.append(benchmark(ctx)) - else: - pipelines = before + stages + after + purge_dependencies = testPipelines(ctx) + + if '[with-benchmarks]' in (ctx.build.title + ctx.build.message): + before.append(benchmark(ctx)) + purge_dependencies.append(benchmark(ctx)) + + purge = purgeBuildArtifactCache(ctx, 'ocis-binary-amd64') + purge['depends_on'] = getPipelineNames(purge_dependencies) + + pipelines = before + stages + after + [purge] notify_pipeline = notify(ctx) notify_pipeline['depends_on'] = \