AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   Docker Image for Continuous integration (CI) with GitLab Runner (https://forums.alliedmods.net/showthread.php?t=301901)

RAYs3T 10-08-2017 13:56

Docker Image for Continuous integration (CI) with GitLab Runner
 
While searching, i've noticed that there is no optimized docker image for building sourcemod plugins out there. So i decided to build one. :)

The image is intended to be used together with GitLab-Runner.

GitLab runner is starting the container, checking out your project and compiling the plugins by executing the command spcomp inside the docker vm.

When the image getting installed it installs the latest sourcemod ( 1.8 ) version.

With GitLab you also have the ability to provide the artifacts (.smx -files) for download, after the build has completed.

For more details, have a look at the Dockerfile/Image


I'm open to any kind of feedback :salty: / feature request.

ReymonARG 10-11-2017 10:50

Re: Docker Image for Continuous integration (CI) with GitLab Runner
 
You just need to unzip de plugins folders not all. Also, you dont need git

Mitchell 10-11-2017 12:14

Re: Docker Image for Continuous integration (CI) with GitLab Runner
 
but why

ImACow 10-11-2017 12:20

Re: Docker Image for Continuous integration (CI) with GitLab Runner
 
Quote:

Originally Posted by Mitchell (Post 2553890)
but why

CI with GitLab is very usefull.
I use it to deploy code to servers.
Just commit, and the servers will pull the SMX'es whenever they are empty.

So thanks for this!

RAYs3T 10-11-2017 14:25

Re: Docker Image for Continuous integration (CI) with GitLab Runner
 
Quote:

Originally Posted by Mitchell (Post 2553890)
but why

Well, I'm working in a larger company. If you develop programs, CI is one of the biggest and most important things, if you want to make high quality and reliable code.

And since we as a community developed a lot of own software, systems and plugins, CI is very helpful. It can protect you and even makes it a lot easier to deploy your build versions automatically to the servers. Or just compile it.


For sourcemod this isn't that effective, because there is currently no official support for automated testing. There is a project (PawnUnit), but i'm not sure if it is still up to date. I will check it out.

My plan is to create a complete docker environment, which can bootstrap a game-server and maybe even some clients (need to check if this can be done, there may some legal restrictions due license terms of the games) to run tests against a plugin. In this way you can ensure the changes you did to a plugin won't break any other functionality.

Another benefit, if you working on a plugin together with more people, someone may commit broken code. This way he will get a notification that he did so and needs to fix the code.
(Keep in mind that you should never commit broken code ... :nono:)


Quote:

Originally Posted by ReymonARG (Post 2553873)
You just need to unzip de plugins folders not all. Also, you dont need git

Im decompressing the whole folder to give the user the ability to add custom operations, that may require some of the other files.

Ugh, git isn't required by the GitLab runner to pull the data from VCS? I will check this, it may could be that the data is pushed trough the docker interface. :)


Quote:

Originally Posted by ImACow (Post 2553892)
CI with GitLab is very usefull.
I use it to deploy code to servers.
Just commit, and the servers will pull the SMX'es whenever they are empty.

So thanks for this!

We plan to release many of our plugins and OOS them. So a CI is one of the first projects that are essential for providing a stable and nice codebase. A codebase where anyone can contribute using modern technology that should be standard for every software project, no matter what size (talking about CI).

Thanks for the feedback so far!

ReymonARG 10-16-2017 12:31

Re: Docker Image for Continuous integration (CI) with GitLab Runner
 
Yes, i also work with more than 600 csgo servers and using deploy is a big big help...

you are running csgo server in containers?

RAYs3T 10-29-2017 10:34

Re: Docker Image for Continuous integration (CI) with GitLab Runner
 
Quote:

Originally Posted by ReymonARG (Post 2554877)
you are running csgo server in containers?

Currently not, but we have plans for it.


All times are GMT -4. The time now is 18:53.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.