You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownew \RuntimeException('Could not find the Gitlab URL in the "CI_BUILD_REPO" environment variable (usually set by Gitlab CI). Either set this environment variable or pass the URL via the --gitlab-url command line option.');
53
+
$ciProjectUrl = getenv('CI_BUILD_REPO');
54
+
if ($ciProjectUrl === false) {
55
+
thrownew \RuntimeException('Could not find the Gitlab URL in the "CI_REPOSITORY_URL" (Gitlab 9+) or "CI_BUILD_REPO" (Gitlab 8.x) environment variable (usually set by Gitlab CI). Either set this environment variable or pass the URL via the --gitlab-url command line option.');
thrownew \RuntimeException('Could not find the Gitlab build reference in the "CI_BUILD_REF" environment variable (usually set by Gitlab CI). Either set this environment variable or pass the build reference via the --gitlab-build-ref command line option.');
thrownew \RuntimeException('Could not find the Gitlab build reference in the "CI_COMMIT_SHA" (Gitlab 9+) or "CI_BUILD_REF" (Gitlab 8.x) environment variable (usually set by Gitlab CI). Either set this environment variable or pass the build reference via the --commit-sha command line option.');
thrownew \RuntimeException('Could not find the Gitlab build id in the "CI_BUILD_ID" environment variable (usually set by Gitlab CI). Either set this environment variable or pass the build id via the --gitlab-build-id command line option.');
108
+
$buildId = getenv('CI_JOB_ID');
109
+
if ($buildId === false) {
110
+
thrownew \RuntimeException('Could not find the Gitlab build id in the "CI_JOB_ID" (Gitlab 9+) or "CI_BUILD_ID" (Gitlab 8.x) environment variable (usually set by Gitlab CI). Either set this environment variable or pass the build id via the --gitlab-job-id command line option.');
111
+
}
101
112
}
102
113
}
103
114
return$buildId;
@@ -109,11 +120,18 @@ public function getGitlabBuildId() : int
0 commit comments