GitService
GitService(rest)
Bases: ObjectService
Service to interact with GIT
Source code in TM1py/Services/GitService.py
COMMON_PARAMETERS = {'username': 'Username', 'password': 'Password', 'message': 'Message', 'author': 'Author', 'email': 'Email', 'branch': 'Branch', 'new_branch': 'NewBranch', 'force': 'Force', 'public_key': 'PublicKey', 'private_key': 'PrivateKey', 'passphrase': 'Passphrase', 'config': 'Config'}
class-attribute
instance-attribute
git_execute_plan(plan_id, **kwargs)
Executes a plan based on the planid
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plan_id
|
str
|
GitPlan id |
required |
git_get_plans(**kwargs)
Gets a list of currently available GIT plans
Source code in TM1py/Services/GitService.py
git_init(git_url, deployment, username=None, password=None, public_key=None, private_key=None, passphrase=None, force=None, config=None, **kwargs)
Initialize GIT service, returns Git object
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
git_url
|
str
|
file or http(s) path to GIT repository |
required |
deployment
|
str
|
name of selected deployment group |
required |
username
|
str
|
GIT username |
None
|
password
|
str
|
GIT password |
None
|
public_key
|
str
|
SSH public key, available from PAA V2.0.9.4 |
None
|
private_key
|
str
|
SSH private key, available from PAA V2.0.9.4 |
None
|
passphrase
|
str
|
Passphrase for decrypting private key, if set |
None
|
force
|
bool
|
reset git context on True |
None
|
config
|
dict
|
Dictionary containing git configuration parameters |
None
|
Source code in TM1py/Services/GitService.py
git_pull(branch, force=None, execute=None, username=None, password=None, public_key=None, private_key=None, passphrase=None, **kwargs)
Creates a gitpull plan, returns response
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
branch
|
str
|
The name of source branch |
required |
force
|
bool
|
A flag passed in for evaluating preconditions |
None
|
execute
|
bool
|
Executes the plan right away if True |
None
|
username
|
str
|
GIT username |
None
|
password
|
str
|
GIT password |
None
|
public_key
|
str
|
SSH public key, available from PAA V2.0.9.4 |
None
|
private_key
|
str
|
SSH private key, available from PAA V2.0.9.4 |
None
|
passphrase
|
str
|
Passphrase for decrypting private key, if set |
None
|
Source code in TM1py/Services/GitService.py
git_push(message, author, email, branch=None, new_branch=None, force=False, username=None, password=None, public_key=None, private_key=None, passphrase=None, execute=None, **kwargs)
Creates a gitpush plan, returns response
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
Commit message |
required |
author
|
str
|
Name of commit author |
required |
email
|
str
|
Email of commit author |
required |
branch
|
str
|
The branch which last commit will be used as parent commit for new branch. Must be empty if GIT repo is empty |
None
|
new_branch
|
str
|
If specified, creates a new branch and pushes the commit onto it. If not specified, pushes to the branch specified in "Branch" |
None
|
force
|
bool
|
A flag passed in for evaluating preconditions |
False
|
username
|
str
|
GIT username |
None
|
password
|
str
|
GIT password |
None
|
public_key
|
str
|
SSH public key, available from PAA V2.0.9.4 |
None
|
private_key
|
str
|
SSH private key, available from PAA V2.0.9.4 |
None
|
passphrase
|
str
|
Passphrase for decrypting private key, if set |
None
|
execute
|
bool
|
Executes the plan right away if True |
None
|
Source code in TM1py/Services/GitService.py
git_status(username=None, password=None, public_key=None, private_key=None, passphrase=None, **kwargs)
Get GIT status, returns Git object
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
GIT username |
None
|
password
|
str
|
GIT password |
None
|
public_key
|
str
|
SSH public key, available from PAA V2.0.9.4 |
None
|
private_key
|
str
|
SSH private key, available from PAA V2.0.9.4 |
None
|
passphrase
|
str
|
Passphrase for decrypting private key, if set |
None
|
Source code in TM1py/Services/GitService.py
git_uninit(force=False, **kwargs)
Unitialize GIT service
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
force
|
bool
|
clean up git context when True |
False
|