Description Usage Arguments Details Examples
Functions around public and private variables available in Travis CI builds.
travis_get_vars()
calls the "/settings/env_vars" API.
travis_get_var_id()
retrieves the ID for a variable name, or NULL
.
If multiple variables exist by that name, it returns the ID of the last
(with a warning),
because this is what seems to be used in Travis CI builds in such a case.
travis_set_var()
creates or updates a variable.
If multiple variables exist by that name, it updates the last (with a warning),
because this is what seems to be used in Travis CI builds in such a case.
travis_delete_var()
deletes a variable.
1 2 3 4 5 6 7 8 9 10 11 | travis_get_vars(repo = github_repo(), token = travis_token(repo))
travis_get_var_id(name, repo = github_repo(),
token = travis_token(repo))
travis_set_var(name, value, public = FALSE, repo = github_repo(),
token = travis_token(repo), quiet = FALSE)
travis_delete_var(name, repo = github_repo(),
token = travis_token(repo), id = travis_get_var_id(name, repo = repo,
token = token), quiet = FALSE)
|
repo |
|
token |
|
name |
|
value |
|
public |
|
quiet |
|
id |
|
Avoid using travis_set_var()
with literal values
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
# List all variables:
travis_get_vars()
## End(Not run)
## Not run:
# Get the ID of a variable.
travis_get_var_id("secret_var")
## End(Not run)
## Not run:
# Avoid calling with literal values:
travis_set_var("secret_var", "oh no - this will be recorded in .Rhistory!")
# Set a Travis environment variable without recording it in history
# by reading the value from the console:
travis_set_var("secret_var", readLines(n = 1))
## End(Not run)
## Not run:
# Delete a variable:
travis_delete_var("secret_var")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.