rattail.sw.locsms.deploy – Deployment Interface
This module attempts to simplify deployment of “hotfixes” (in the form of commands, support files, and data) and samples, etc., to various nodes within SMS “environments” (be they development or production).
Turns off the “File is ready for archiving” bit on file specified by path.
Constructs a Node instance and returns it. The path to the node’s Storeman folder is required and must be present in config. key is used to distinguish in case you have more than one node configured:
[rattail.sw.locsms]
node = C:\Storeman
node.testlane = \TESTLANE\Storeman
Those two nodes could be retrieved with the following calls:
node = get_node()
node = get_node('testlane')
Represents a SMS “environment” corresponding to an arbitrary system, be it development, testing, production or otherwise. This is meant to reflect real-world use cases and system administration workflows, and is used to organize deployment configuration etc.
Contains settings for deploying a hotfix(es), specific to an environment.
Represents a local file intended to be deployed as part of a hotfix.
Represents a node belonging to a rattail.sw.locsms.deploy.Environment instance.
Copies file from path to the node’s inbox folder, and turns off the new file’s archive bit.
Returns the full path to the node’s “inbox” folder.
Returns the node’s “name” in STORE:TER format.
Contains settings for deploying samples, specific to an environment.
The following functions can be used to locate a full target path. The function signatures intentionally match, to accommodate the mapping used by TARGET_DIRS.
Todo
This whole concept probably already needs some refactoring...
Returns the full path to the “inbox” folder for the given rattail.sw.locsms.deploy.Node instance. path is accepted for compatibility’s sake but is ignored.
Returns a fully-qualified version of path, relative to the root of the given rattail.sw.locsms.deploy.Node instance.
Returns a fully-qualified version of path, relative to the given rattail.sw.locsms.deploy.Node‘s Office folder.
Returns an appropriate fully-qualified path according to the mappings found in TARGET_DIRS.
And for convenience:
A dictionary which, for each supported target folder, maps a human-readable name to the appropriate get_*_path() function (see above).