NodeJS/Jenkins/GIT and Jenkins Slave as Web server

I want to do Continuous Integration for one of my web server applications.
We are using Postgres as a backend database. To achieve this we are planning to use NodeJS/Jenkins and GIT.

Once any developers check-in their changes the build has to start immediately and do some basic testing.
This involves starting the NodeJS server and executing a few test cases.

  • Setting up Continuous Integration with SVN
  • Jenkins cannot access to SVN (https://)
  • Which continuous integration server is able to queue jobs?
  • How to uninstall Jenkins?
  • How can I add hooks to gitlab?
  • How do I get TeamCity to Merge master into Pull Request before each build?
  • I have integrated Jenkins and GIT so that whenever the git change is notified the Jenkins build starts.

    Can we run the NodeJS web server in the same Jenkins machine or should we use a slave Windows machine for this?

    Please suggest best practices for this?

    The assumption is the server machine will have Postgres DB installed and NPM also installed.


  • Start-Process “git” returns strange 129 exit code
  • Cloning a git repo succeeds with the command line, but fails with a git GUI client (e.g. SourceTree)
  • How can I use “git-svn” to checkout a local svn repository?
  • Apply stash to different branch
  • How to specify where Git LFS files will be stored?
  • Rebasing in smartgit “git-am is in progress”
  • 2 Solutions collect form web for “NodeJS/Jenkins/GIT and Jenkins Slave as Web server”

    To have reporoducible builds, I recommend the Docker integration for Jenkins. This allows multiple builds to be processed simoultaniously, so if a build takes longer than expected, other developers can push as well.

    As each container has an own network, you can run as many containers as you want at the same time with each having an own Node server listening on the same port. As long as you don’t need to access the node server from the outside of the container (for example from the build server itself), you have no problem there.

    For the Postgresql database: you can either spawn a database server in your container which means that you have a lot of short-lived DB servers. Depending on the amount of testing data you need to import, this might not be a solution. The other way is to run the Postgresql server on the build server, and allow the containers to access it. In each build, you create a new database in Postgresql, probably with a template. You can destroy the db afterwards.

    So the process is:

    [Developer pushes] -> [git notifies Jenkins] -> [Jenkins creates database] -> [Jenkins runs container] -> [Container builds and tests] -> [Container processes results] -> [Jenkins destroys database]

    For the result proceesing step, there are multiple ways to do it. The easiest way (which does not require any additional software) is to have Jenkins merge the branch automatically. Each developer pushes a new branch for his work and if the tests succeed, Jenkins merges the branch to master. You can forbid the user to write to the master branch directly to enforce this.

    The other way is to integrate Jenkins into your git hosting solution (if you use any). GitLab EE supports this which means that you can see the test results for each commit in GitLab. Of course, this is not a solution if you don’t use anything like GitLab/Bitbucket/…

    Suggestion to use PM2 tool, it has high set of features.

    This tool than can be configured in Jenkins & scripts can be written in package.json

    Git Baby is a git and github fan, let's start git clone.