Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sucssite
doorkey
Commits
7486ecd8
Commit
7486ecd8
authored
Dec 31, 2021
by
Imran Hussain
Browse files
Add CI/CD to doorkey
parent
5d25bebd
Pipeline
#837
passed with stages
in 1 minute and 27 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
7486ecd8
stages
:
-
test
-
deploy
#before_script:
php-syntax-check
:
stage
:
test
script
:
-
apt-get clean
-
apt-get update
-
apt-get install -y php-cli
-
php -l public/index.php
-
php -l public/pull.php
deploy-live
:
stage
:
deploy
image
:
curlimages/curl:7.80.0
script
:
-
curl --fail-with-body https://doorkey.sucs.org/pull.php
only
:
-
master
environment
:
live
public/pull.php
0 → 100644
View file @
7486ecd8
<?php
exec
(
"cd ..; git reset --hard HEAD; git pull"
,
$retArr
,
$retVal
);
if
(
$retVal
==
0
)
{
print
(
"ok"
);
exit
(
0
);
}
print
(
"not ok
\n
"
);
var_dump
(
$retArr
);
var_dump
(
$retVal
);
?>
\ No newline at end of file
Write
Preview
Supports
Markdown
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