GIT_URL
(required) - the GIT URL of the repository (http or ssh)GIT_URL
(required) - the HTTP GIT URL of the repositoryGIT_USER
(optional) - the git username, defaults to oauth2
if it’s emptyGIT_PASSWORD
(required) - the password or token that has read access to the repositoryGIT_URL
(required) - the HTTP GIT URL of the repositoryGIT_SSH_KEY
(required) - the private key that has read access to the repositoryGIT_SSH_USER
(optional) - the git username, defaults to git
if it’s emptyGIT_SSH_KEYPASS
(optional) - the password of the keyGIT_SSH_KNOWN_HOSTS
(optional) - the path to the known hosts file to useGIT_SSH_KNOWN_HOSTS
to prevent MITM when cloning repositories.
It will try to obtain the known hosts issuing the command ssh-keyscan
in case this configuration is not set.File Path | Event Trigger | Environment Variables | Description |
---|---|---|---|
hoop-hooks/session-open.runbook.py | Session Open | HOOP_RUNBOOK_HOOK_PAYLOAD | It trigger when a session is being opened |
hoop-hooks/session-close.runbook.py | Session Close | HOOP_RUNBOOK_HOOK_PAYLOAD | It trigger when a session is being closed |
event_session_open
will be available when the session is openedevent_session_close
will be available when the session is closed{{ }}
and the input name must start with a dot. - Example - {{ .myinput }}
The input name must comply with the regular expression \.[a-zA-Z0-9_]+
GET /api/plugins/runbooks/connections/:dbconn/templates
|
. Example:
required "<message>"
- it will return the error if the input is empty
<message>
- the message to return when the condition doesn’t matchdefault "<value>"
- add a default value to the input if it’s empty
<value>
- the default value to setpattern "<regexp>"
- a regexp pattern to validate the input
<regexp>
- the go regular expression to validate the inputdescription "<message>"
- used as attribute specification to client input validation
<message>
- the description of the inputtype "<type>"
- used as attribute specification to client input validation
<type>
- the type of the input (see supported fields for a list of types)placeholder "<message>"
- used as attribute specification to client input validation
<message>
- the description of the placeholderoptions "<option>" "..."
- used as attribute specification to client input validation
"<option>" "..."
- a list of strings describing each optionsquote
- wraps the input with single quotes: '
dquote
- wraps the input with double quotes: "
quotechar "<char>"
- wraps the input with <char>
<char>
- the character to wrap the inputencodeb64
- encode the input as base64
decodeb64
- decode a base64 input
asenv "<environment>"
- add the input as a environment variable
<environment>
- the name of the environment variableThe functions description and type always returns the value of the last command.
myinput
as base64myinput
into single quote and encode the input as base64myinput
, encode the value as base64 and then wrap it using the character %
color
as input type select with options red, white and blackasenv
function allows defining inputs and mapping then as environment variables in the connection runtime. Instead of injecting the value as an input directly to the template, it will gather the value and inject as an environment variable when executing the session.
The inputs could be just defined in a comment in the template, examples:
customer_id
input as an environment variable avoiding bash injections with shell control operators