Own executables on GitLab.com CI/CD

I would like to create a project where some of the commited files are compiled by LaTeX. When I use GitLab.com in the free plan, can I install LaTeX on the server? Or how does one go about installing executables in this situation anyway? By gaining ssh access on the server? Or are only the preinstalled executables available?

Hi,

with GitLab CI, you can make use of the Docker executor running your jobs in a dedicated sandbox. Within these jobs, you can freely define

  • the base image, e.g. ubuntu:bionic
  • install required dependencies via package managers or similar
  • run a Latex compile step
  • upload the artifacts somewhere external

I’d recommend starting simple with a small .gitlab-ci.yml configuration. Make use of the Web IDE, then you can do that within the browser directly.

image: ubuntu:bionic 

latex:
  script:
    - echo "Hello from GitLab CI"
    - exit 1

Once this runs and turns red, modify the above exit 1 to exit 0, commit and watch the results.

In case you want to dive into GitLab CI even more, I’ve created an open source training for NETWAYS which includes easy learning steps. The CI exercises focus on generating markdown into HTML, which is similar to your approach.

Here are some examples how others achieved this specifically with LateX and GitLab CI.

Cheers,
Michael

Thank you so much for taking the time to explain, this totally makes sense. Have a good day!

1 Like