Stash Software API
2.0.0
|
[ MODULE ] - Callback module. More...
Functions | |
Script Related Functions | |
def | preScriptPath (projectName, developerName, developmentEnvName, stageEnvName, platformName, appPath, custom, command) |
This function is invoked before the environment is initialized. More... | |
def | postScriptPath (projectName, developerName, developmentEnvName, stageEnvName, platformName, appPath, custom, command) |
This function is invoked after the environment is initialized. More... | |
Environment Related Functions | |
def | preEnvironmentBuild (projectName, developerName, developmentEnvName, stageEnvName, platformName, appPath, custom, command) |
This function is invoked before packages are collected and environment is resolved. More... | |
def | postEnvironmentBuild (projectName, developerName, developmentEnvName, stageEnvName, platformName, appPath, custom, command) |
This function is invoked after packages are collected and environment is resolved. More... | |
Package Related Functions | |
def | shouldInitializePackage (packagePath, projectName, developerName, developmentEnvName, stageEnvName, platformName, appPath, custom, command, pythonVersion) |
This function is invoked before a package gets initialized. More... | |
App Related Functions | |
def | getExecutableFlags (projectName, developerName, developmentEnvName, stageEnvName, platformName, appPath, custom, command) |
Return the flags that will be added to the executable. More... | |
[ MODULE ] - Callback module.
def sStash.callbackLib.preScriptPath | ( | projectName, | |
developerName, | |||
developmentEnvName, | |||
stageEnvName, | |||
platformName, | |||
appPath, | |||
custom, | |||
command | |||
) |
This function is invoked before the environment is initialized.
You can return multiple scripts by separating them | in return string.
projectName | [ str | None | in ] - Project name. |
developerName | [ str | None | in ] - Developer name. |
developmentEnvName | [ str | None | in ] - Development environment name. |
stageEnvName | [ str | None | in ] - Stage environment name. |
platformName | [ str | None | in ] - Platform name, either one of the following: Linux, Darwin, Windows. |
appPath | [ str | None | in ] - App path. |
custom | [ str | None | in ] - Custom values passed to executable by –custom flag. |
command | [ str | None | in ] - Entire command, which is executed to set the environment. |
N/A |
def sStash.callbackLib.postScriptPath | ( | projectName, | |
developerName, | |||
developmentEnvName, | |||
stageEnvName, | |||
platformName, | |||
appPath, | |||
custom, | |||
command | |||
) |
This function is invoked after the environment is initialized.
You can return multiple scripts by separating them | in return string.
projectName | [ str | None | in ] - Project name. |
developerName | [ str | None | in ] - Developer name. |
developmentEnvName | [ str | None | in ] - Development environment name. |
stageEnvName | [ str | None | in ] - Stage environment name. |
platformName | [ str | None | in ] - Platform name, either one of the following: Linux, Darwin, Windows. |
appPath | [ str | None | in ] - App path. |
custom | [ str | None | in ] - Custom values passed to executable by –custom flag. |
command | [ str | None | in ] - Entire command, which is executed to set the environment. |
N/A |
def sStash.callbackLib.preEnvironmentBuild | ( | projectName, | |
developerName, | |||
developmentEnvName, | |||
stageEnvName, | |||
platformName, | |||
appPath, | |||
custom, | |||
command | |||
) |
This function is invoked before packages are collected and environment is resolved.
Return object must be a list instance that contains dict instances with the following keys:
Key | Data Type | Description |
---|---|---|
entryType | str | Either one of the following values: single, multi, command, script. |
variable | str | Name of the environment variable. |
value | str | Value of the environment variable. |
projectName | [ str | None | in ] - Project name. |
developerName | [ str | None | in ] - Developer name. |
developmentEnvName | [ str | None | in ] - Development environment name. |
stageEnvName | [ str | None | in ] - Stage environment name. |
platformName | [ str | None | in ] - Platform name, either one of the following: Linux, Darwin, Windows. |
appPath | [ str | None | in ] - App path. |
custom | [ str | None | in ] - Custom values passed to executable by –custom flag. |
command | [ str | None | in ] - Entire command, which is executed to set the environment. |
N/A |
def sStash.callbackLib.postEnvironmentBuild | ( | projectName, | |
developerName, | |||
developmentEnvName, | |||
stageEnvName, | |||
platformName, | |||
appPath, | |||
custom, | |||
command | |||
) |
This function is invoked after packages are collected and environment is resolved.
Return object must be a list instance that contains dict instances with the following keys:
Key | Data Type | Description |
---|---|---|
entryType | str | Either one of the following values: single, multi, command, script. |
variable | str | Name of the environment variable. |
value | str | Value of the environment variable. |
projectName | [ str | None | in ] - Project name. |
developerName | [ str | None | in ] - Developer name. |
developmentEnvName | [ str | None | in ] - Development environment name. |
stageEnvName | [ str | None | in ] - Stage environment name. |
platformName | [ str | None | in ] - Platform name, either one of the following: Linux, Darwin, Windows. |
appPath | [ str | None | in ] - App path. |
custom | [ str | None | in ] - Custom values passed to executable by –custom flag. |
command | [ str | None | in ] - Entire command, which is executed to set the environment. |
N/A |
def sStash.callbackLib.shouldInitializePackage | ( | packagePath, | |
projectName, | |||
developerName, | |||
developmentEnvName, | |||
stageEnvName, | |||
platformName, | |||
appPath, | |||
custom, | |||
command, | |||
pythonVersion | |||
) |
This function is invoked before a package gets initialized.
You can implement this function to determine whether a package with given packagePath
should be initialized.
Return object must be bool instance, either True or False.
packagePath | [ str | None | in ] - Absolute path of the package. |
projectName | [ str | None | in ] - Project name. |
developerName | [ str | None | in ] - Developer name. |
developmentEnvName | [ str | None | in ] - Development environment name. |
stageEnvName | [ str | None | in ] - Stage environment name. |
platformName | [ str | None | in ] - Platform name, either one of the following: Linux, Darwin, Windows. |
appPath | [ str | None | in ] - App path. |
custom | [ str | None | in ] - Custom values passed to executable by –custom flag. |
command | [ str | None | in ] - Entire command, which is executed to set the environment. |
pythonVersion | [ str | None | in ] - Python version used by Stash. |
N/A |
def sStash.callbackLib.getExecutableFlags | ( | projectName, | |
developerName, | |||
developmentEnvName, | |||
stageEnvName, | |||
platformName, | |||
appPath, | |||
custom, | |||
command | |||
) |
Return the flags that will be added to the executable.
This function gets invoked if an app is provided to the executable. Provided app information can be obtained via appPath
argument that provides the absolute path of the app file.
projectName | [ str | None | in ] - Project name. |
developerName | [ str | None | in ] - Developer name. |
developmentEnvName | [ str | None | in ] - Development environment name. |
stageEnvName | [ str | None | in ] - Stage environment name. |
platformName | [ str | None | in ] - Platform name, either one of the following: Linux, Darwin, Windows. |
appPath | [ str | None | in ] - App path. |
custom | [ str | None | in ] - Custom values passed to executable by –custom flag. |
command | [ str | None | in ] - Entire command, which is executed to set the environment. |
N/A |