Skip to contents

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.

Usage

orderly_location_add(name, type, args, root = NULL, locate = TRUE)

Arguments

name

The short name of the location to use. Cannot be in use, and cannot be one of local or orphan

type

The type of location to add. Currently supported values are path (a location that exists elsewhere on the filesystem) and http (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 if locate is TRUE. This function does not require that the directory is configured for orderly, and can be any outpack 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 for root (or the working directory if NULL) and then up through its parents until it finds an .outpack directory or orderly_config.yml

Value

Nothing

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 example http://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 server

  • token: The value for your your login token (currently this is a GitHub token with read: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.

Warning

The API here may change as we move to support different types of locations.