xaizek / fragile (License: AGPLv3+) (since 2018-12-07)
Simple lightweight CI, attempting to be somewhat Unix-like in its philosophy.
Commit d0d3b1ce464daf8b2c4129e2c101e0a05a40d05a

Change Build::{setResult => markAsFinished}()
Author: xaizek
Author date (UTC): 2018-11-23 10:28
Committer name: xaizek
Committer date (UTC): 2018-11-23 10:28
Parent(s): 77af52aecb535bd2a915477e29a5641349239604
Signing key: 99DC5E4DB05F6BE2
Tree: 2d2194952e244487de28eea1ff4bd3f139b2dbbb
File Lines added Lines deleted
classes/Build.php 1 1
daemon.php 5 3
File classes/Build.php changed (mode: 100644) (index 8dfb9d8..2f846bd)
... ... class Build
134 134 * @param status New status string. * @param status New status string.
135 135 * @param output Multiline build output. * @param output Multiline build output.
136 136 */ */
137 public function setResult($status, $output, $exitcode)
137 public function markAsFinished($status, $output, $exitcode)
138 138 { {
139 139 $output = gzdeflate($output, 9); $output = gzdeflate($output, 9);
140 140 if ($output === false) { if ($output === false) {
File daemon.php changed (mode: 100644) (index da451f9..933dd55)
... ... function runBuilds($builds)
112 112 $revision = $build->revision; $revision = $build->revision;
113 113 system(__DIR__ . "/vcs/checkout '" . $revision . "'", $retval); system(__DIR__ . "/vcs/checkout '" . $revision . "'", $retval);
114 114 if ($retval != 0) { if ($retval != 0) {
115 $build->setResult('ERROR', "Failed to checkout revision\n",
116 $retval);
115 $build->markAsFinished('ERROR',
116 "Failed to checkout revision\n",
117 $retval);
117 118 $revision = ''; $revision = '';
118 119 continue; continue;
119 120 } }
 
... ... function runBuild($build)
149 150 $exitcode = pclose($handle); $exitcode = pclose($handle);
150 151
151 152 $output = makeReport($rawOutput); $output = makeReport($rawOutput);
152 $build->setResult(($exitcode == 0) ? 'OK' : 'FAIL', $output, $exitcode);
153 $build->markAsFinished(($exitcode == 0) ? 'OK' : 'FAIL', $output,
154 $exitcode);
153 155 } }
154 156
155 157 /** /**
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/fragile

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/fragile

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master