Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13199434
D8092.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
820 B
Referenced Files
None
Subscribers
None
D8092.diff
View Options
Index: src/applications/harbormaster/engine/HarbormasterBuildEngine.php
===================================================================
--- src/applications/harbormaster/engine/HarbormasterBuildEngine.php
+++ src/applications/harbormaster/engine/HarbormasterBuildEngine.php
@@ -101,6 +101,22 @@
->setViewer($this->getViewer())
->withBuildPHIDs(array($build->getPHID()))
->execute();
+
+ if (!$targets) {
+ return;
+ }
+
+ $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
Details
Attached
Mime Type
text/plain
Expires
May 14 2024, 2:44 PM (6 w, 18 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6295351
Default Alt Text
D8092.diff (820 B)
Attached To
Mode
D8092: Delete artifacts when restarting build
Attached
Detach File
Event Timeline
Log In to Comment