This is a git plugin (based on Jgit) which contain a Resource model and worflow steps
For authentication, it can be used a private key or a password. If the private key is not defined, then the password will be used.
- The primary key will work with SSH protocol on the Git URL.
- The password will work with http/https protocol on the Git URL (the most of the case, the username is needed on the URI, eg:
http[s]://[email protected][:port]/path/to/repo.git/
when you use password authentication)
Run the following command to built the jar file:
./gradlew clean build
Copy the git-plugin-x.y.x.jar
file to the $RDECK_BASE/libext/
directory inside your Rundeck installation.
This is a resource model plugin that uses Git to store resources model file.
You need to set up the following options to use the plugin:
-
Base Directory: Directory for checkout
-
Git URL: Checkout URL. See git-clone specifically the GIT URLS section. Some examples:
ssh://[user@]host.xz[:port]/path/to/repo.git/
git://host.xz[:port]/path/to/repo.git/
http[s]://host.xz[:port]/path/to/repo.git/
ftp[s]://host.xz[:port]/path/to/repo.git/
rsync://host.xz/path/to/repo.git/
-
Branch: Checkout branch
-
Resource model File: Resource model file inside the github repo. This is the file that will be added to Rundeck resource model.
-
File Format: File format of the resource model, it could be xml, yaml, json
-
Writable: Allow to write the remote file
- Git Password: Password to authenticate remotely
- SSH: Strict Host Key Checking: Use strict host key checking.
If
yes
, require remote host SSH key is defined in the~/.ssh/known_hosts
file, otherwise do not verify. - SSH Key Path: SSH Key Path to authenticate
- The plugin needs to clone the full repo on the local directory path (Base Directory option) to get the file that will be added to the resource model.
- Any time that you edit the nodes on the GUI, the commit will be perfomed with the message
Edit node from GUI
(it is not editable)
This plugin can clone/pull, add, commit, and push a git repository via 4 WorkflowSteps. All these steps have some generic configuration:
- Base Directory: Directory for checkout. If
project.plugin.WorkflowStep.git-clone-step.gitUseProjectBasedSubdirectory
is set to true in the project configuration, this will be relative to a project-based subdirectory. - Git URL: Checkout URL.
See git-clone
specifically the GIT URLS section.
Some examples:
ssh://[user@]host.xz[:port]/path/to/repo.git/
git://host.xz[:port]/path/to/repo.git/
http[s]://host.xz[:port]/path/to/repo.git/
ftp[s]://host.xz[:port]/path/to/repo.git/
rsync://host.xz/path/to/repo.git/
- Password Storage Path: Password storage path to authenticate remotely
- SSH: Strict Host Key Checking: Use strict host key checking.
If
yes
, require remote host SSH key is defined in the~/.ssh/known_hosts
file, otherwise do not verify. - SSH Key Storage Path: SSH Key storage path to authenticate
This plugin can clone a git repo into a rundeck server folder.
For some use cases, it might be necessary to only allow checking out repositories in directories relative to the Rundeck home directory. Allow users to checkout in any location on disk might be a security issue.
The setting project.plugin.WorkflowStep.git-clone-step.gitUseProjectBasedSubdirectory
(per project) or framework.plugin.WorkflowStep.git-clone-step.gitUseProjectBasedSubdirectory
(Rundeck-wide)
can be set to true
to enforce this (default is false
). All values of Base Directory
will be relative to a project-based subdirectory of the Rundeck home directory (e.g. /var/lib/rundeck/A_Project
).
You need to set up following additional options to use the plugin:
- Branch: Checkout branch
This plugin pushes a git repo from a prior created repo folder.
For some use cases, it might be necessary to only allow pushing repositories in directories relative to the Rundeck home directory.
The setting project.plugin.WorkflowStep.git-push-step.gitUseProjectBasedSubdirectory
(per project) or framework.plugin.WorkflowStep.git-push-step.gitUseProjectBasedSubdirectory
(Rundeck-wide)
can be set to true
to enforce this (default is false
). All values of Base Directory
will be relative to a project-based subdirectory of the Rundeck home directory (e.g. /var/lib/rundeck/A_Project
).
See above, nothing unique with this WorkflowStep.
This plugin adds any new content from the repo for the next commit with an optional filter ability.
For some use cases, it might be necessary to only allow adding to repositories in directories relative to the Rundeck home directory.
The setting project.plugin.WorkflowStep.git-add-step.gitUseProjectBasedSubdirectory
(per project) or framework.plugin.WorkflowStep.git-add-step.gitUseProjectBasedSubdirectory
(Rundeck-wide)
can be set to true
to enforce this (default is false
). All values of Base Directory
will be relative to a project-based subdirectory of the Rundeck home directory (e.g. /var/lib/rundeck/A_Project
).
You need to set up following additional options to use the plugin:
- File Pattern: File Pattern of files to be added. See addFilepattern for more details
This plugin commits to a git repo from a prior created repo folder.
For some use cases, it might be necessary to only allow committing to repositories in directories relative to the Rundeck home directory.
The setting project.plugin.WorkflowStep.git-commit-step.gitUseProjectBasedSubdirectory
(per project) or framework.plugin.WorkflowStep.git-commit-step.gitUseProjectBasedSubdirectory
(Rundeck-wide)
can be set to true
to enforce this (default is false
). All values of Base Directory
will be relative to a project-based subdirectory of the Rundeck home directory (e.g. /var/lib/rundeck/A_Project
).
You need to set up following additional options to use the plugin:
- Message: Commit message to be used. Defaults to
Rundeck Commit
- Add: Adds all contents of the git repo before commiting. Defaults to
False
. If you need to be more specific, please useGIT / Add
workflow step. - Push: Pushes the repository after commiting the changes. Defaults to
False
.