Adding gitlab collapsible tasks support. (#2718)

* Adding gitlab collapsible tasks support.

* remove patch.

Co-authored-by: Dan Shumaker <dshumaker@unleashed-technologies.com>
This commit is contained in:
Dan Shumaker 2021-10-26 18:42:38 -04:00 committed by GitHub
parent dc4a75ce3d
commit d220ae6c8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,6 +40,8 @@ class Messenger
if (!$task->isShallow()) { if (!$task->isShallow()) {
if (getenv('GITHUB_WORKFLOW')) { if (getenv('GITHUB_WORKFLOW')) {
$this->output->writeln("::group::task {$task->getName()}"); $this->output->writeln("::group::task {$task->getName()}");
} else if (getenv('GITLAB_CI')) {
$this->output->writeln("\e[OKsection_start:task {$task->getName()}[collapsed=true]\r\e[OK{$task->getName()}");
} else { } else {
$this->output->writeln("<fg=cyan;options=bold>task</> {$task->getName()}"); $this->output->writeln("<fg=cyan;options=bold>task</> {$task->getName()}");
} }
@ -67,6 +69,8 @@ class Messenger
if (getenv('GITHUB_WORKFLOW')) { if (getenv('GITHUB_WORKFLOW')) {
$this->output->writeln("::endgroup::"); $this->output->writeln("::endgroup::");
} if (getenv('GITLAB_CI')) {
$this->output->writeln("\e[OKsection_end:{$taskTime}:{$task->getName()}");
} else if ($this->output->isVeryVerbose()) { } else if ($this->output->isVeryVerbose()) {
$this->output->writeln("<fg=yellow;options=bold>done</> {$task->getName()} $taskTime"); $this->output->writeln("<fg=yellow;options=bold>done</> {$task->getName()} $taskTime");
} }