Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webhook-test-zsy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张思远
webhook-test-zsy
Commits
54efa98a
Commit
54efa98a
authored
Dec 21, 2023
by
张思远
Browse files
Options
Browse Files
Download
Plain Diff
m
parents
4ff0c8ac
0eb75f7f
Pipeline
#160
failed with stages
in 0 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
14 deletions
+31
-14
.gitlab-ci.yml
.gitlab-ci.yml
+10
-2
t.bat
t.bat
+0
-6
t.sh
t.sh
+3
-0
test.txt
test.txt
+4
-0
webhook.php
webhook.php
+14
-6
No files found.
.gitlab-ci.yml
View file @
54efa98a
build-job
:
stage
:
build
script
:
-
echo "Hello, $GITLAB_USER_LOGIN!"
-
echo "Hello, 1"
tags
:
-
test
test-job1
:
stage
:
test
script
:
-
echo "This job tests something"
tags
:
-
test
test-job2
:
stage
:
test
...
...
@@ -15,9 +19,13 @@ test-job2:
-
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
tags
:
-
test
deploy-prod
:
stage
:
deploy
script
:
-
echo "This job deploys something from the
$CI_COMMIT_BRANCH branch.
"
-
echo "This job deploys something from the
1
"
environment
:
production
tags
:
-
test
t.bat
View file @
54efa98a
<<<<<<< HEAD
cd %1
git pull
=======
%username%
pause
>>>>>>> 86113a3e1937102c4b42424a70135869c24d5425
t.sh
0 → 100644
View file @
54efa98a
#!/bin/bash
git pull
\ No newline at end of file
test.txt
View file @
54efa98a
git pull test success
test runner
test piplelines
<<<<<<< HEAD
runer test
=======
test runner tags
>>>>>>> 0eb75f7f9bbda142f21dbf959f2f34994b023be9
webhook.php
View file @
54efa98a
<?php
header
(
'Content-type:text/html;charset=utf-8'
);
$post
=
file_get_contents
(
"php://input"
);
$post
=
json_decode
(
$post
,
true
);
$project
=
$post
[
'project'
];
$web_url
=
$project
[
'web_url'
];
$web_url
=
str_replace
(
'http://'
,
'https://'
,
$web_url
);
// echo $web_url;exit;
$dir
=
__DIR__
;
$cmd
=
't.bat '
.
$dir
.
' '
.
$web_url
;
if
(
strpos
(
strtoupper
(
PHP_OS
),
'WIN'
)
===
0
)
{
$project
=
$post
[
'project'
];
$web_url
=
$project
[
'web_url'
];
$web_url
=
str_replace
(
'http://'
,
'https://'
,
$web_url
);
// echo $web_url;exit;
$dir
=
__DIR__
;
$cmd
=
't.bat '
.
$dir
.
' '
.
$web_url
;
}
else
{
//su
$cmd
=
'bash t.sh'
;
}
$descriptorspec
=
[
[
"pipe"
,
"r"
],
// stdin
[
"pipe"
,
"w"
],
// stdout
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment