Add a new location - a place where other packets might be found and pulled into your local archive. Currently only file and http based locations are supported, with limited support for custom locations. Note that adding a location does not pull metadata from it, you need to call orderly_location_pull_metadata first.
Arguments
- name
The short name of the location to use. Cannot be in use, and cannot be one of
local
ororphan
- type
The type of location to add. Currently supported values are
path
(a location that exists elsewhere on the filesystem) andhttp
(a location accessed over outpack's http API).- args
Arguments to the location driver. The arguments here will vary depending on the type used, see Details.
- root
The path to the root directory, or
NULL
(the default) to search for one from the current working directory iflocate
isTRUE
. This function does not require that the directory is configured for orderly, and can be anyoutpack
root (see orderly_init for details).- locate
Logical, indicating if the root should be searched for. If
TRUE
, then we looks in the directory given forroot
(or the working directory ifNULL
) and then up through its parents until it finds an.outpack
directory ororderly_config.yml
Details
We currently support two types of locations - path
, which points
to an outpack archive accessible by path (e.g., on the same
computer or on a mounted network share), http
, which requires
that an outpack server is running at some url and uses an HTTP API
to communicate, and packit
, which uses Packit as a web
server. More types may be added later, and more configuration
options to these location types will definitely be needed in
future.
Configuration options for different location types:
Path locations:
path
: The path to the other archive root. This should generally be an absolute path, or the behaviour of outpack will be unreliable.
HTTP locations:
Accessing outpack over HTTP requires that an outpack server is running. The interface here is expected to change as we expand the API, but also as we move to support things like TLS and authentication.
url
: The location of the server, including protocol, for examplehttp://example.com:8080
Packit locations:
Packit locations work over HTTPS, and include everything in an outpack location but also provide authentication and later will have more capabilities we think.
url
: The location of the servertoken
: The value for your your login token (currently this is a GitHub token withread:org
scope). If missing or NULL, orderly2 will perform an interactive authentication against GitHub to obtain one.save_token
: If no token is provided and interactive authentication is used, this controls whether the GitHub token should be saved to disk. Defaults to TRUE if missing.
Custom locations:
All outpack implementations are expected to support path and http
locations, with the standard arguments above. But we expect that
some implementations will support custom locations, and that the
argument lists for these may vary between implementations. To
allow this, you can pass a location of type "custom" with a list
of arguments. We expect an argument 'driver' to be present among
this list. For an example of this in action, see the
outpack.sharepoint
package.
Be warned that we may change this interface in future, in which case you may need to update your configuration.