Skip to contents

Set gitlab continuous integration

Usage

use_gitlab_ci(
  image = "rocker/verse",
  repo_name = "https://packagemanager.rstudio.com/all/__linux__/focal/latest",
  project_path = ".",
  type = "check-coverage-pkgdown",
  bookdown_output_format = c("lozen::paged_template", "lozen::bs4_book_template"),
  overwrite = TRUE
)

Arguments

image

Docker image used as basis. See https://github.com/rocker-org/rocker

repo_name

REPO_NAME environment variable for R CRAN mirror used

project_path

Path of the project to add CI in.

type

type of the CI template to use

bookdown_output_format

If type="bookdown" it corresponds to the function used to output the bookdown

overwrite

whether to overwrite existing GitLab CI yml file

Details

See use_gitlab_ci

Examples

withr::with_tempdir({
  use_gitlab_ci(image = "r-base")
})
#>  There is no ./.gitlab-ci.yml in your project, a new one will be created.
#> [1] "./.gitlab-ci.yml"

withr::with_tempdir({
  use_gitlab_ci(
    image = "rocker/verse",
    repo_name = "https://packagemanager.rstudio.com/all/__linux__/focal/latest",
    type = "check-coverage-pkgdown"
  )
})
#>  There is no ./.gitlab-ci.yml in your project, a new one will be created.
#> [1] "./.gitlab-ci.yml"