Skip to content

Commit

Permalink
use md5 of task name for section id in gitlab ci (#3817)
Browse files Browse the repository at this point in the history
Resolves #3787
  • Loading branch information
fliespl authored Apr 21, 2024
1 parent dce9f78 commit af6f878
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Executor/Messenger.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ public function startTask(Task $task): void
if (getenv('GITHUB_WORKFLOW')) {
$this->output->writeln("::group::task {$task->getName()}");
} else if (getenv('GITLAB_CI')) {
$sectionId = md5($task->getName());
$start = round($this->startTime/1000);
$this->output->writeln("\e[0Ksection_start:{$start}:{$start}[collapsed=true]\r\e[0K{$task->getName()}");
$this->output->writeln("\e[0Ksection_start:{$start}:{$sectionId}[collapsed=true]\r\e[0K{$task->getName()}");
} else {
$this->output->writeln("<fg=cyan;options=bold>task</> {$task->getName()}");
}
Expand All @@ -78,9 +79,9 @@ public function endTask(Task $task, bool $error = false): void
if (getenv('GITHUB_WORKFLOW')) {
$this->output->writeln("::endgroup::");
} else if (getenv('GITLAB_CI')) {
$sectionId = md5($task->getName());
$endTime = round($endTime/1000);
$start = round($this->startTime/1000);
$this->output->writeln("\e[0Ksection_end:{$endTime}:{$start}\r\e[0K");
$this->output->writeln("\e[0Ksection_end:{$endTime}:{$sectionId}\r\e[0K");
} else if ($this->output->isVeryVerbose()) {
$this->output->writeln("<fg=yellow;options=bold>done</> {$task->getName()} $taskTime");
}
Expand Down

0 comments on commit af6f878

Please sign in to comment.