lkwdwrd / git-deploy Goto Github PK
View Code? Open in Web Editor NEWGit Deploy Script
Git Deploy Script
Bitbucket has notices on the POST services settings page and on their documentation stating that the will at some-point be discontinuing POST services in favor of Webhooks.
Do you have plans of updating your repo to work with a webhook instead of a POST service?
Below is the deprecation notice on the POST Service documention page.
In the future, you will no longer be able to create a POST service from the Services screen, as
Bitbucket’s updated webhooks will replace this service. Existing services will continue to function
as expected for now.To create a new webhook, refer to the webhooks documentation.
its amazing work, thx alot.
in your documentation you missed and used "[email protected]:lkwdwrd/git-deploy.git" url which need a ssh key
Hi,
Great little piece of code - I've set it up and have everything (seemingly) running nicely.
I can push/pull code using git pull over SSH without issue and my deployments.log file is being updated whenever I push to my bitbucket repo.
However, the code within my directories on the webserver is not updating...is the post hook returning an empty payload and if so, how do I test?
Thanks
Instead of $_POST['payload']
seems my data is in $HTTP_RAW_POST_DATA.
Is there a reason for this? Do I need to change some settings?
After following the setup instructions I get the following error in my log:
PHP Fatal error: Call to undefined function getallheaders() in /home/themechef/public_html/deploy/github.php on line 39
I've looked through all the other files and I don't see any other reference to this function. Any idea why I might be getting this error?
Thanks in advance.
Hi!
I've been having some trouble getting the script to deploy even a public GitHub repo. I've been committing to this test repository without any luck: https://github.com/zalerner/deploy-test
The webhook appears to be delivering its payload based on the green check mark. Upon closer inspection it's getting a 200 response with this in the body:
<h1>No payload present</h1><p>A GitHub POST payload is required to deploy from this script.</p>
I was wondering if this was potentially a configuration or permissions issue on my end. Here's my config:
<?php
$repos = array(
'deploy-test' => array(
'branch' => 'master',
'remote' => 'origin',
'path' => '/home/danceint/public_staging/gh-deploy/put-code-here/'
)
);
define( 'DEPLOY_LOG_DIR', dirname( __FILE__ ) );
require_once 'inc/class.deploy.php';
The path is definitely right, but I wasn't sure about how much of the repo name was required. Unfortuantely, the deployments.log file isn't getting written to, and these initial PHP errors don't seem to be appearing anymore:
[04-Mar-2015 18:11:10 CST6CDT] PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
[04-Mar-2015 18:13:21 CST6CDT] PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
[04-Mar-2015 18:15:31 CST6CDT] PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
[04-Mar-2015 18:16:48 CST6CDT] PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
This is on a shared hosting environment where git is installed and I'm able to push/pull without any difficulty. Everything is owned by the primary FTP/SSH user. Any insight into what's happening would be huge!
Thanks for your time!
Zack
ie : master & staging
Greetings and thanks for this great program.
I am using Ubuntu 14 with Nginx on my local computer, my project is hosted at Bitbucket. Just now I sorted out .ssh directory must be created manually for user www-data, and copy ssh key files from /root/.ssh directory. If there could be more debug information in log file, that will be very helpful.
I suppose what this does is a git pull, but how I can test it to be sure that current apache user is able to pull from the repository? what key will it use? I don't think is a good idea to do a bunch of testing commits... just for test this.
What about Gitlab support?
I config follow (user window server, xampp):
$repos = array(
'DemoAuto' => array(
'branch' => 'master',
'remote' => 'origin',
'path' => 'D:\Xampp\htdocs\demo_svn\\',
'secret' => $_GET["sat"]
)
);
When run push, info return:
[SHA: 73b613b2b1ef] Deployment of DemoAuto from branch master successful
But i check file then not update.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.