Skip to content
Snippets Groups Projects
Commit 9892fdf0 authored by Emanuele Aina's avatar Emanuele Aina
Browse files

gitlab-ci: Reduce cost and latency of jobs


Add the `lightweight` tag to run jobs on the GitLab runners set up for
jobs that do not need large amounts of resources (max 2GB of RAM) and do
not need privileged containers.

The former makes jobs cheaper because they user smaller VM instance
types, the latter improves latency as there's no strong need to spin
separate VMs to keep each job isolated and existing instances can be
re-used instead.

Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent ee55acc1
No related branches found
No related tags found
1 merge request!95gitlab-ci: Reduce cost and latency of jobs
Pipeline #159571 passed
...@@ -14,6 +14,8 @@ stages: ...@@ -14,6 +14,8 @@ stages:
test-html: test-html:
image: registry.gitlab.com/pages/hugo:0.62.2 image: registry.gitlab.com/pages/hugo:0.62.2
stage: generate-html stage: generate-html
tags:
- lightweight
script: script:
- DEFAULT_BASEURL=${CI_PAGES_URL##http:} # don't force stuff on plain HTTP when publishing on HTTPS - DEFAULT_BASEURL=${CI_PAGES_URL##http:} # don't force stuff on plain HTTP when publishing on HTTPS
- BASEURL=${BASEURL:-$DEFAULT_BASEURL} # set BASEURL in the CI variables to override it - BASEURL=${BASEURL:-$DEFAULT_BASEURL} # set BASEURL in the CI variables to override it
...@@ -26,6 +28,8 @@ test-html: ...@@ -26,6 +28,8 @@ test-html:
.gen-pdf: .gen-pdf:
image: docker-registry.apertis.org/apertis/apertis-v2020-documentation-builder image: docker-registry.apertis.org/apertis/apertis-v2020-documentation-builder
stage: generate-pdf stage: generate-pdf
tags:
- lightweight
script: script:
- echo "Building PDFs on $(nproc) cores" - echo "Building PDFs on $(nproc) cores"
- find public -name "*.pdf-in" -print0 | xargs -0 -r -n1 -P "$(nproc)" scripts/create-pdf - find public -name "*.pdf-in" -print0 | xargs -0 -r -n1 -P "$(nproc)" scripts/create-pdf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment