Skip to contents

Produces a GitLab CI YAML job that installs the system packages a plan needs. GitLab CI jobs usually run as root inside a container image, so the commands are emitted without sudo.

Usage

gitlab_ci(
  x,
  platform = NULL,
  job = "install_system_requirements",
  missing_only = TRUE,
  ...
)

Arguments

x

A sysreqr_plan or package vector.

platform

Platform specification accepted by resolve_platform().

job

Name of the generated CI job.

missing_only

Whether to include only packages not known to be installed.

...

Passed to check_packages() when x is not a plan.

Value

A YAML snippet.

Examples

plan <- check_packages("xml2", platform = "ubuntu-22.04", backend = "bundled")
cat(gitlab_ci(plan))
#> install_system_requirements:
#>   script:
#>     - apt-get update
#>     - apt-get install -y libxml2-dev