Description Usage Arguments Details Value See Also Examples
These functions retrieve and modify environment variables for the Travis-CI build environment, as a possible alternative to specifying them in a .travis.yml file.
1 2 3 4 5 6 7 | get_env_vars(repo, id, ...)
add_env_vars(repo, evar, public = TRUE, ...)
update_env_vars(repo, id, evar, public, ...)
delete_env_var(repo, id, ...)
|
repo |
A character string specifying a repo slug (i.e., cloudyr/travisci) a numeric Travis-CI repository ID, or an object of class “travis_repo”. If a slug is used, it will be implicitly converted to a repository ID in some cases where only the latter is accepted. |
id |
An alphanumeric ID for a given environment variable or an object of class “travis_envvar”, for example as returned by one of these functions. |
... |
Additional arguments passed to |
evar |
A list of environment variables as key-value pairs. |
This can be useful for checking, creating, updating, or deleting environment variables used as build settings. See hrefhttp://docs.travis-ci.com/user/environment-variables/the API documentation for full details.
A list of objects of class “travis_envvar”, except for delete_env_vars
, which returns a logical.
get_encryption_key
, for handling encrypted environment variables
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
# authenticate based on Sys.setenv("GITHUB_TOKEN" = "sometoken")
auth_travis()
# get environment variables for a repo
get_env_vars("cloudyr/travisci")
# get a specific environment variable based on its ID
get_env_vars("cloudyr/travisci", id = 12345)
# set environment variables
e <- add_env_vars("cloudyr/travisci", var = list(VAR1 = "value1", VAR2 = "value2"))
# update an environment variable
update_env_vars("cloudyr/travisci", id = e$id,
var = list(VAR1 = "newvalue")
# delete an environment variable
delete_env_vars("cloudyr/travisci", id = e$id)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.