Commit 468e6871 by 张思远

a

parents 7d052820 86113a3e
Pipeline #153 canceled with stages
build-job:
stage: build
script:
- echo "Hello, $GITLAB_USER_LOGIN!"
test-job1:
stage: test
script:
- echo "This job tests something"
test-job2:
stage: test
script:
- echo "This job tests something, but takes more time than test-job1."
- echo "After the echo commands complete, it runs the sleep command for 20 seconds"
- echo "which simulates a test that runs 20 seconds longer than test-job1"
- sleep 20
deploy-prod:
stage: deploy
script:
- echo "This job deploys something from the $CI_COMMIT_BRANCH branch."
environment: production
<<<<<<< HEAD
cd %1
git pull
\ No newline at end of file
git pull
=======
%username%
pause
>>>>>>> 86113a3e1937102c4b42424a70135869c24d5425
git pull test success
\ No newline at end of file
git pull test success
test runner
\ No newline at end of file
<?php
header('Content-type:text/html;charset=utf-8');
$post = file_get_contents("php://input");
$post = json_decode($post, true);
mkdir(time(), 0755);
$project = $post['project'];
$web_url = $project['web_url'];
$web_url = str_replace('http://','https://', $web_url);
// echo $web_url;exit;
$dir = __DIR__;
exit;
\ No newline at end of file
$cmd = 't.bat ' . $dir . ' ' . $web_url;
$descriptorspec = [
["pipe", "r"], // stdin
["pipe", "w"], // stdout
["pipe", "w"], // stderr
];
$proc = proc_open($cmd, $descriptorspec, $pipes, null, null);
if ($proc == false) {
// do sth with HTTP response
} else {
$stdout = stream_get_contents($pipes[1]);
fclose($pipes[1]);
$stderr = stream_get_contents($pipes[2]);
fclose($pipes[2]);
$status = proc_close($proc); // 释放proc
}
echo '<dl>';
echo '<dt>输出</dt>';
echo '<dd><pre>' . $stdout . '</pre></dd>';
if ($stderr) {
// echo '<dt>出错了!</dt>';
echo '<dd><pre>' . $stderr . '</pre></dd>';
}
echo '</dl>';
exit;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment