Create Creating PDFS with Gitlab Runner authored by YANIQUE CAMPBELL_CAMPBELY's avatar YANIQUE CAMPBELL_CAMPBELY
## Gitlab Runner
GitLab Runner is an application that works with GitLab CI/CD to run jobs in a pipeline.
You can choose to install the GitLab Runner application on infrastructure that you own or manage. If you do, **you should install GitLab Runner on a machine that’s separate from the one that hosts the GitLab instance** for security and performance reasons.
It is currently installed on Yanique's Macbook.
### Setup Steps
Installation instructions can be found [here](https://cwincloud.cc.umanitoba.ca/canwin_public/canwin-public-documents/-/settings/ci_cd)/ go to: Settings> CI/CD>Runners (expand).
- Install GitLab runner - https://docs.gitlab.com/runner/install/osx.html
**Download the binary for your system:**
`sudo curl --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-amd64`
**Give it permission to execute:**
`sudo chmod +x /usr/local/bin/gitlab-runner`
**Register the runner (steps below), then run:**
```
cd ~
gitlab-runner install
gitlab-runner start
```
- Register the GitLab Runner - gitlab-runner register
`gitlab-runner register --url https://cwincloud.cc.umanitoba.ca/ --registration-token`
`$REGISTRATION_TOKEN`
The registration token can be found [here](https://cwincloud.cc.umanitoba.ca/canwin_public/canwin-public-documents/-/settings/ci_cd).
## The Job - _build_pdf_
Currently only one job (build_pdf) is running specifiic to this directory, and its purpose is to convert the markdown files in [_docs_](https://cwincloud.cc.umanitoba.ca/canwin_public/canwin-public-documents/-/tree/main/docs) to PDFs so that they can be added to the RTD site.
Whenever any commits are made to the _docs_ directory, this job will run. The job installs dependencies and runs a [python script](https://cwincloud.cc.umanitoba.ca/canwin_public/canwin-public-documents/-/blob/main/build_pdf.py) to do the conversion.
## Finding the PDFs
See the [README.md](https://cwincloud.cc.umanitoba.ca/canwin_public/canwin-public-documents/-/blob/main/docs/README.md) in the docs directory for a listing of the individual PDFs.
The latest build of PDFs generated by the Gitlab runner can be found [here](https://cwincloud.cc.umanitoba.ca/canwin_public/canwin-public-documents/-/jobs/artifacts/main/browse?job=build_pdf). Navigate to docs/pdfs to see all files.
\ No newline at end of file