NodeJS / Jenkins / GIT and Jenkins Slave as a web server

I want to do continuous integration for one of my web server applications. We use Postgres as the base database. For this, we plan to use NodeJS / Jenkins and GIT.

As soon as any developers register their changes, the assembly should immediately begin and conduct basic testing. This is due to starting the NodeJS server and running a few test cases.

I have included Jenkins and GIT so that whenever a GIT notification is notified, the Jenkins build begins.

Can I run the NodeJS web server on the same Jenkins computer or use a Windows machine for this?

Please offer recommendations for this?

It is assumed that Postgres DB and NPM will be installed on the server machine.

Thank.

+4
source share
2 answers

To have reporoducible builds, I recommend Docker integration for Jenkins. This allows you to process multiple assemblies simulatively, so if the assembly takes longer than expected, other developers can also click.

Since each container has its own network, you can run as many containers as you want, while each of them has its own Node server listening on the same port. As long as you do not need to access the Node server from outside the container (for example, from the build server itself), you have no problem.

Postgresql , , . , , . - Postgresql . Postgresql, , . db.

, :

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

. ( ) , Jenkins . , , . , .

Jenkins git ( -). GitLab EE , , GitLab. , , GitLab/Bitbucket/...

+3

Source: https://habr.com/ru/post/1663920/


All Articles