gl_builds: Access the Gitlab CI builds

Description Usage Arguments Value Examples

Description

List the jobs with gl_jobs, the pipelines with gl_pipelines or download the most recent artifacts archive with gl_latest_build_artifact. For every branch and job combination only the most recent artifacts archive is available. gl_builds is the equivalent for gitlab API v3.

Usage

1
2
3
4
5
6
7
8
gl_pipelines(project, ...)

gl_jobs(project, ...)

gl_builds(project, force_api_v3 = TRUE, ...)

gl_latest_build_artifact(project, job, ref_name = "master",
  save_to_file = tempfile(fileext = ".zip"), ...)

Arguments

project

project name or id, required

...

passed on to gitlab API call

force_api_v3

Since gl_builds is no longer working for Gitlab API v4, this must be set to TRUE in order to avoid deprecation warning and HTTP error. It currently default to TRUE, but this will change with gitlabr 1.0.

job

Name of the job to get build artifacts from

ref_name

name of ref (i.e. branch, commit, tag)

save_to_file

either a path where to store .zip file or NULL if raw should be returned

Value

returns the file path if save_to_file is TRUE, or the archive as raw otherwise.

Examples

1
2
3
4
5
6
7
## Not run: 
my_gitlab <- gl_connection(...) ## fill in login parameters
my_gitlab(gl_pipelines, "test-project")
my_gitlab(gl_jobs, "test-project")
my_gitlab(gl_latest_build_artifact, "test-project", job = "build")

## End(Not run)

jirkalewandowski/gitlabr documentation built on May 19, 2019, 11:37 a.m.