Page MenuHomePhabricator

D8092.id18301.diff
No OneTemporary

D8092.id18301.diff

diff --git a/src/applications/harbormaster/engine/HarbormasterBuildEngine.php b/src/applications/harbormaster/engine/HarbormasterBuildEngine.php
--- a/src/applications/harbormaster/engine/HarbormasterBuildEngine.php
+++ b/src/applications/harbormaster/engine/HarbormasterBuildEngine.php
@@ -101,6 +101,17 @@
->setViewer($this->getViewer())
->withBuildPHIDs(array($build->getPHID()))
->execute();
+ $target_phids = mpull($targets, 'getPHID');
+
+ $artifacts = id(new HarbormasterBuildArtifactQuery())
+ ->setViewer($this->getViewer())
+ ->withBuildTargetPHIDs($target_phids)
+ ->execute();
+
+ foreach ($artifacts as $artifact) {
+ $artifact->delete();
+ }
+
foreach ($targets as $target) {
$target->delete();
}

File Metadata

Mime Type
text/plain
Expires
May 14 2024, 3:36 PM (6 w, 17 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6295408
Default Alt Text
D8092.id18301.diff (782 B)

Event Timeline