Apr 24, 2020
0
Level 1
HELP!!!! Auto Deployment Laravel with Gitlab.
Hello Friends!
I need to auto pull from gitlab on my server whenever I push from my local.
- I had setup Deployment keys too..
- Integration also done. Webhooks url is also set.
- I put the pull.php file inside public folder.which looks like this :
header("Cache-Control: no-cache, max-age=0");
echo "<pre>";
shell_exec("git pull origin master");
echo "\n";
echo "========\n";
echo "\n";
echo "Last Commit\n";
echo shell_exec("git log |head -5");
echo "</pre>";
Push-events is also triggered... But its not pulling. and running Webhooks url : my-domain/pull.php show earlier commit only. not the last one
If I went through shh and run git pull origin master, it pulls. and there's fast-forward always "
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 9 (delta 6), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (9/9), done.
From gitlab.com:user/my-project
d6cb111..837db8b master -> origin/master
Updating d6cb111..837db8b
Fast-forward
resources/views/home.blade.php | 22 +++++++++++-----------
and then if i run the Webhooks url : my-domain/pull.php it now shows the recent commits
Please or to participate in this conversation.