summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2019-05-21 02:31:03 +0200
committerMatija Čupić <matteeyah@gmail.com>2019-05-21 17:16:06 +0200
commit404a541dbc21b500cbf09c479ee3d2f341106863 (patch)
treeca00a45fcd0e6ee11b6eda9cf2a78d541a75a9ee
parent01a28eada1215fe9d97b16bb405a1f1eb52f4ee3 (diff)
downloadgitlab-ce-mc/bug/pipeline-cache-invalid.tar.gz
Expire pipeline cache on finishmc/bug/pipeline-cache-invalid
-rw-r--r--app/workers/build_finished_worker.rb1
-rw-r--r--spec/workers/build_finished_worker_spec.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/app/workers/build_finished_worker.rb b/app/workers/build_finished_worker.rb
index adc38226405..8e2a18a8fd8 100644
--- a/app/workers/build_finished_worker.rb
+++ b/app/workers/build_finished_worker.rb
@@ -30,6 +30,7 @@ class BuildFinishedWorker
# We execute these async as these are independent operations.
BuildHooksWorker.perform_async(build.id)
ArchiveTraceWorker.perform_async(build.id)
+ ExpirePipelineCacheWorker.perform_async(build.pipeline_id)
ChatNotificationWorker.perform_async(build.id) if build.pipeline.chat?
end
end
diff --git a/spec/workers/build_finished_worker_spec.rb b/spec/workers/build_finished_worker_spec.rb
index 33f327d4a0c..4adb795b1d6 100644
--- a/spec/workers/build_finished_worker_spec.rb
+++ b/spec/workers/build_finished_worker_spec.rb
@@ -17,6 +17,7 @@ describe BuildFinishedWorker do
expect_any_instance_of(BuildCoverageWorker).to receive(:perform)
expect(BuildHooksWorker).to receive(:perform_async)
expect(ArchiveTraceWorker).to receive(:perform_async)
+ expect(ExpirePipelineCacheWorker).to receive(:perform_async)
described_class.new.perform(build.id)
end