From 770889baa0fdf69542fd34b08fb6a70ff124077b Mon Sep 17 00:00:00 2001 From: prashant-gurung899 Date: Thu, 28 Aug 2025 09:45:17 +0545 Subject: [PATCH] purge opencloud web build cache and tracing cache Signed-off-by: prashant-gurung899 --- .woodpecker.star | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.woodpecker.star b/.woodpecker.star index 8806834211..0d72b06431 100644 --- a/.woodpecker.star +++ b/.woodpecker.star @@ -513,6 +513,20 @@ def main(ctx): ), ) + test_pipelines.append( + pipelineDependsOn( + purgeTracingCache(ctx), + testPipelines(ctx), + ), + ) + + test_pipelines.append( + pipelineDependsOn( + purgeOpencloudWebBuildCache(ctx), + testPipelines(ctx), + ), + ) + pipelines = test_pipelines + build_release_pipelines + notifyMatrix(ctx) # if ctx.build.event == "cron": @@ -2465,11 +2479,10 @@ def purgeCache(name, flush_path, flush_age): 'if [ -z "$to_delete" ]; then exit 0; fi', "mc rm $to_delete", ], - } - ] + }, + ], } - def genericBuildArtifactCache(ctx, name, action, path): if action == "rebuild" or action == "restore": cache_path = "%s/%s/%s" % ("cache", repo_slug, ctx.build.commit + "-${CI_PIPELINE_NUMBER}") @@ -2477,7 +2490,7 @@ def genericBuildArtifactCache(ctx, name, action, path): return genericCache(name, action, [path], cache_path) if action == "purge": - return purgeCache("purge_build_artifact_cache", "cache/opencloud-eu/opencloud", 1) + return purgeCache("purge_opencloud_build_artifact_cache", "cache/opencloud-eu/opencloud", 1) return [] def restoreBuildArtifactCache(ctx, name, path): @@ -2492,6 +2505,12 @@ def purgeBuildArtifactCache(ctx): def purgeBrowserCache(ctx): return purgeCache("purge_browser_build_cache", "dev/web", 14) +def purgeTracingCache(ctx): + return purgeCache("purge_playwright_tracing_cache", "public/web/tracing", 14) + +def purgeOpencloudWebBuildCache(ctx): + return purgeCache("purge_opencloud_web_build_cache", "dev/opencloud/web-test-runner", 14) + def pipelineSanityChecks(pipelines): """pipelineSanityChecks helps the CI developers to find errors before running it