-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdump-current.php
36 lines (28 loc) · 1 KB
/
dump-current.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php declare(strict_types=1);
// Dump values from current environment
require_once __DIR__ . '/vendor/autoload.php';
$ciDetector = new \OndraM\CiDetector\CiDetector();
if (!$ciDetector->isCiDetected()) {
exit('No CI detected' . "\n");
}
$ci = $ciDetector->detect();
echo '$ci->getCiName()' . "\n";
var_dump($ci->getCiName());
echo "\n" . '$ci->getBuildNumber()' . "\n";
var_dump($ci->getBuildNumber());
echo "\n" . '$ci->getBuildUrl()' . "\n";
var_dump($ci->getBuildUrl());
echo "\n" . '$ci->getCommit()' . "\n";
var_dump($ci->getCommit());
echo "\n" . '$ci->getBranch()' . "\n";
var_dump($ci->getBranch());
echo "\n" . '$ci->getTargetBranch()' . "\n";
var_dump($ci->getTargetBranch());
echo "\n" . '$ci->getRepositoryName()' . "\n";
var_dump($ci->getRepositoryName());
echo "\n" . '$ci->getRepositoryUrl()' . "\n";
var_dump($ci->getRepositoryUrl());
echo "\n" . '$ci->isPullRequest()->describe()' . "\n";
var_dump($ci->isPullRequest()->describe());
echo "\n" . '$ci->describe()' . "\n";
print_r($ci->describe());