Jump to content
 Share

NogginBlaster

Building sourcemod plugins using gitlab CI

Recommended Posts

Posted  Edited by NogginBlaster

First off why?

- CI means you don't have to go through the extra step of compiling the project then uploading the compiled files to the repo

- Basically it allows you to be lazy by only worrying about committing to gitlab

 

 

Guides (this is not a guide for how to use git it assumes you know how to use it)

Copy the files found here https://gitlab.gflclan.com/NogginBlaster/sm-plugin-template/-/tree/master or here https://gitlab.gflclan.com/NogginBlaster/sm-plugin-template/-/tree/old-filestructure. (use old-filestructure if you want your plugin in the ./scripting/ directory)

(Make sure you delete the .git folder if you clone)

Write your plugin (I've put in example files that you can overwrite or delete)

Commit your changes (there might be a way to do this in your editor/ide)

git add .
git commit
git push

After you push to your gitlab the build should start and you can access the logs/build files from the webpage

- The build files can be downloaded via viewing the artifacts, they should include the compiled plugin, translations and configs.

 

Notes

If you already have a repository just download the `.gitlab-ci.yml` file into the root of your repo, you may need to reconfigure the BUILD_DIR and COMPILE_DIR for more info regarding these see https://github.com/RAYs3T/Sourcemod-CI-Dockerfile

In order to use CI on gitlab, the gitlab host must have a runner, you can read about setting up your own here https://docs.gitlab.com/runner/install/ , you should be able to get a registration token by going to repository settings -> CI/CD. If you use windows like me I found the easiest way to install was using a ubuntu server (with containerd and docker) VM and installing everything there.

Edited by NogginBlaster

Visit my github if you love self promotion.

558499_101.png

Share this post


Link to post
Share on other sites




×
×
  • Create New...