How can I build my local git repo on external server?

Industrial-antidepressant

In our company we have really powerful linux based build servers (double Xeon with 40 core) and not so powerful win7 laptops. We building our product in C/C++ language for an esoteric CPU. The compiler only exist in Linux. I can edit my git repo with Qt Creator. It is working and quite fast and everything. But I can't build the source on our Laptop. We have a main git repo and I can clone the same repo to my laptop and to our build server. I want to achieve that when I press the build button my code magically building on build server. I did a proof of concept solution where my build script do a git diff on my repo and scp it to the build server than it ssh to build server apply that diff on the server repo than start and wait the compilation. But that solution is not so fool proof. I think a better approaching/method is exist. So how can I build my git repo on external server?

VonC

If you can push to a bare repo on the build server, then you can associate to that bare repo a post-receive hook (.git/hooks/post-receive) which will:

  • checkout the code

    #!/bin/sh
    git --work-tree=/var/www/domain.com --git-dir=/var/repo/site.git checkout -f
    
  • trigger the compilation.

That way, you don't have to handle the diff yourself.
You only have to associate to the build button the action to push your branch to the bare repo of the build server, and the post-receive hook will do the rest.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I get the git repo on my server to automatically sync with changes to the github repo?

From Dev

Can I add a file to my local Git repo but not push it to remote

From Dev

Can't push a git repo on a local server

From Dev

How can I re-normalize my git repo

From Dev

How can I reduce the size of my git repo?

From Dev

How can I re-init my git repo?

From Dev

How can I push a git repo to a remote server through ssh?

From Dev

How can I push a git repo to a remote server through ssh?

From Dev

How can I reject git pushes on an origin repo from a local repo if it does not pass unit tests?

From Dev

How to tell if github repo ahead of my local git cloned repo

From Dev

How to tell if github repo ahead of my local git cloned repo

From Dev

How do I tell git to ignore my local changes, but leave the file in my remote repo?

From Dev

How can I convert all the remote branches in a local git repo into local tracking branches

From Dev

How can I rsync from a server that is accessible via ssh *via a remote login server* to my local computer that does not have an external I.P. address?

From Dev

How can I display dates when local updates were made to a git repo?

From Dev

How can I make gradle overwrite the library in my local maven repo?

From Dev

Can I checkout a CVS repo on my local machine?

From Dev

Can I checkout a CVS repo on my local machine?

From Dev

Why can't I clone a git repo for readthedocs to build the documentation?

From Dev

Why can't I clone a git repo for readthedocs to build the documentation?

From Dev

How can I keep my org repo updated with the main repo?

From Dev

Git - How can I ignore a file of my repo without removing it from the repository?

From Dev

How can I auto-deploy my git repo's submodules on push?

From Dev

Git - How can I ignore a file of my repo without removing it from the repository?

From Dev

How can I add 2 other git repositories as branches for my repo?

From Dev

How can I mirror a bare repo to a working repo - both on the server?

From Dev

How can I access my nodejs web server from my local computer using the server domain name?

From Dev

How can I expose my tomcat server outside of my docker container running on my local machine?

From Dev

Can not clone git repo to server

Related Related

  1. 1

    How can I get the git repo on my server to automatically sync with changes to the github repo?

  2. 2

    Can I add a file to my local Git repo but not push it to remote

  3. 3

    Can't push a git repo on a local server

  4. 4

    How can I re-normalize my git repo

  5. 5

    How can I reduce the size of my git repo?

  6. 6

    How can I re-init my git repo?

  7. 7

    How can I push a git repo to a remote server through ssh?

  8. 8

    How can I push a git repo to a remote server through ssh?

  9. 9

    How can I reject git pushes on an origin repo from a local repo if it does not pass unit tests?

  10. 10

    How to tell if github repo ahead of my local git cloned repo

  11. 11

    How to tell if github repo ahead of my local git cloned repo

  12. 12

    How do I tell git to ignore my local changes, but leave the file in my remote repo?

  13. 13

    How can I convert all the remote branches in a local git repo into local tracking branches

  14. 14

    How can I rsync from a server that is accessible via ssh *via a remote login server* to my local computer that does not have an external I.P. address?

  15. 15

    How can I display dates when local updates were made to a git repo?

  16. 16

    How can I make gradle overwrite the library in my local maven repo?

  17. 17

    Can I checkout a CVS repo on my local machine?

  18. 18

    Can I checkout a CVS repo on my local machine?

  19. 19

    Why can't I clone a git repo for readthedocs to build the documentation?

  20. 20

    Why can't I clone a git repo for readthedocs to build the documentation?

  21. 21

    How can I keep my org repo updated with the main repo?

  22. 22

    Git - How can I ignore a file of my repo without removing it from the repository?

  23. 23

    How can I auto-deploy my git repo's submodules on push?

  24. 24

    Git - How can I ignore a file of my repo without removing it from the repository?

  25. 25

    How can I add 2 other git repositories as branches for my repo?

  26. 26

    How can I mirror a bare repo to a working repo - both on the server?

  27. 27

    How can I access my nodejs web server from my local computer using the server domain name?

  28. 28

    How can I expose my tomcat server outside of my docker container running on my local machine?

  29. 29

    Can not clone git repo to server

HotTag

Archive