how let Buildbot pull changes from git repo by notice? - buildbot

Can anybody give a live example about this question , I followed all articles in Buildbot official sites, there is no live example there. what I want is quite simple, when a developer pushes code to git , the git server tells buildbot to pull changes and start building and deploy process.

You need this:
http://docs.buildbot.net/0.8.8/manual/cfg-changesources.html#chsrc-PBChangeSource
"PBChangeSource actually listens on a TCP port for clients to connect and push change notices into the Buildmaster. This is used by the built-in buildbot sendchange notification tool, as well as several version-control hook scripts."

Related

Synchronize github with godaddy account

I develop front-end and back-end of many websites hosted on godaddy. I was looking for a way to synchronize the godaddy file manager with my local repository so as to prevent me from uploading the edited files each time. I push my code to github directly, but is there a way to push the code directly to godaddy account without using its file manager?
Also sometimes, with other systems, I edit the code directly on the server if I get some problems with the code, which becomes then difficult to get it on my local system.
It would be of great help to directly push it without using the file manager each time.
It would be best to:
install Git on Godaddy (as in this blog post)
setup a bare repo on the upstream side (ie, the GoDady side, the one where you would push your code)
add a post-receive hook on that upstream repo in order for a non-bare repo to update itself: see links in the "Is --bare option equal to core.bare config in Git?" answer.

deploy website with mercurial

I am working on setting up a development/deploy cycle for one of our latest projects. Here is what I am trying to do,
Commit the latest code to local "mercurial" clone.
Push it to central repo hosted at "bitbucket"
Open some web based management console (this is the part I need help with) on my server, which is already configured to use the bitbucket repo automatically fetches the latest commits and shows a list.
Choose one of the revisions and perform an update which will effectively update the website.
If there are some issues with the latest revision, go back to previous version using the same web console.
I am using "SourceTree" for step1 and step2 and I want to keep the whole cycle GUI based. Can anyone suggest any tool which I can use for the server side management (step 3,4,5) ?
This is more simple than you'd think:
Clone the website on your server using bitbucket as the source
Write a small web app which calls hg pull -u in the root folder of your website. Mercurial remembers where to pull from, so you won't need anything here.
The second feature can be implemented using hg id -i (see this answer) to get the current revision. Write that to file.
Now you need a web page which lists all the revisions in that file and runs hg up -r <revision> when you click on one of them.
But maybe a better approach would be to push directly to the web server using hg push from your local repo (see here). You can then use a hook to update the files and save the last revision to a file.
Now you'll only need a web service to revert to a former revision.
Team City is a web app which can do that for you.
It is a continuous integration server but can be configured to only publish when you use the application.
There are many continuous integration servers and I imagine that most/all can do what you want so search around if that one doesn't quite fit your needs.

How do you use Git within Eclipse as it was intended?

I've recently been looking at using Git to eventually replace the CVS repository we have at work. However after watching Linus Torvalds' video on YouTube about Git it seems that every tutorial I find suggests using Git in the same way CVS is used except that you have a local repository which I agree is very useful for speed and distribution.
However the tutorials suggest that what you do is each clone the repository you want to develop on from a remote location and that when changes are made you commit locally building up a history to help with merge control. When you are ready to commit your changes you then push them to the remote location, but first you fetch changes to check for merge conflicts (just like CVS).
However in Linus' video he describe the functionality of Git as a group of developers working on some code pushing and fetching from each other as needed, not using a remote location i.e. a centralized location. He also describes people pushing their changes out to verifiers who fetch and push code also. So you can see it's possible to create scalable structure within a company also.
My question is can anybody point me in the direction of some tutorials that actually explain how to do this distributed development of code using Git so that developers push and fetch code from each other with out committing to the remote repository and if possible it would be very nice to have this tutorials Eclipsed based.
Thanks in advance,
Alexei Blue.
I don't know any specific tutorial about this. In general, for connecting to a repository, you have to be running a git server that listens (and authenticates) to git requests.
To have a specific repository for each developer is possible - but each repository needs that server component. It is possible to store multiple repositories on the same computer, that allows reducing the number of servers required.
However, for other reasons it is beneficial to have some kind of central structure (e.g. a repository for stuff to be released; or a repository for stuff not verified yet). This structure is not required to be a single central repository, but multiple ones with well-defined workflows regarding the data move between repositories (e.g. if code from the verification repository is validated, it should be pushed to the release repository).
In other words, you should be ready to create Git servers (e.g. see http://tumblr.intranation.com/post/766290565/how-set-up-your-own-private-git-server-linux for details; but there are other tutorials for this as well), and define workflows for your own company to use it.
Additionally, I recommend looking at AlBlue's blog series called Git Tip of the Week.
Finally, to ease the introduction I suggest to first introduce Git as a direct replacement for CVS, and then present the other changes one by one.
Take a look at alblue's blog entry on Gerrit
This shows a workflow different from the classic centralized server such as CVS or SVN. Superficially it looks similar as you pull the source from a central Git server, but you push your commits to the Gerrit server that can compile and test the code to make sure it works before eventually pushing the changes to the central Git server.
Now instead of pushing the changes to Gerrit, you could have pushed the code to your pair programming buddy and he could have manually reviewed and tested the code.
Or maybe you're going on holiday and a colleague will finish the task you've started. No problem, just push your changes to their Git repo.
Git doesn't treat any of these other Git instances any different from each other. From Git's perspective, none of them are special.

Github Commit hooks for server integration into cloud9

I work for a small agency that works mainly with php, and we were searching for a simple form of version control. I came across cloud9, and it seemed perfect, but I found no way to integrate it with our servers.
However, cloud9 does integrate seamlessly with github, which made me think is there a way to integrate github with my server. Now I'm under the impression that you can use a 'post_commit' hook in svn to ftp a file to a server when a commit is made. Is there a feature similar to these that I can use with a github repository to automatically send a file to a server when a commit is made? Or is there any software I can install on my server to listen for any changes in a github repository to update itself when any changed are made?
GitHub offers post receive hooks, which can be used to do what you want. Whenever you push to GitHub a POST request to a pre configured URL is sent. The body of the POST message contains a JSON structure with all the information about the push and the commits involved.

GitHuB repository to remote server

Is there anyway I can push changes from my Github Repository to a remote server automatically?
I would like to deploy changes in master branch in my github repository to a remote deployment server. If possible.
I think you could achieve what you want with a Git post-commit hook. whether or not this is a wise thing to be doing is another matter entirely.
Hrm. Somehow my link to http://kernel.org/pub/software/scm/git/docs/v1.3.3/hooks.html isn't showing up, but that's what you want to read.
Okay, I might have found a solution.
Capistrano might hold the answer, although my application is non ruby.
Here's a blog post I found, and I will try to implement it.
Automated deployment