cancel_build: Cancel and Restart Builds

Description Usage Arguments Details Value See Also Examples

Description

Cancel and restart Travis-CI builds

Usage

1
2
3
4
5

Arguments

build

A numeric value specifying a build number or an object of class “travis_build”. (For restart_last_build, this can also be a character string specifying a GitHub repository, such as “user/repo”.)

...

Additional arguments passed to travisHTTP.

Details

cancel_build will cancel a given build. restart_build will restart a cancelled build.

Value

For cancel_build and restart_build, a logical that is TRUE if the operation succeeded. For restart_last_build, the build number is stored in the build_id attributes.

See Also

get_builds

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# authenticate based on Sys.setenv("GITHUB_TOKEN" = "sometoken")
auth_travis()

# get all recent builds for this repo
g <- get_builds(repo = "cloudyr/travisci")

# cancel most recent build
cancel_build(g[[1]]$id)

# restart that build
restart_build(g[[1]]$id)

## End(Not run)

cloudyr/travisci documentation built on May 13, 2019, 8:22 p.m.