rundeck-plugins / git-plugin

10 stars 21 forks source link

Git Plugin

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.

Build

Run the following command to built the jar file:

./gradlew clean build

Install

Copy the git-plugin-x.y.x.jar file to the $RDECK_BASE/libext/ directory inside your Rundeck installation.

GIT Resource Model

This is a resource model plugin that uses Git to store resources model file.

Configuration

You need to set up the following options to use the plugin:

Repo Settings

Authentication

Limitations

Workflow Steps

This plugin can clone/pull, add, commit, and push a git repository via 4 WorkflowSteps. All these steps have some generic configuration:

Repo Settings
Authentication

GIT Clone Workflow Step

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).

Configuration

You need to set up following additional options to use the plugin:

Repo Settings

GIT Push Workflow Step

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).

Configuration

See above, nothing unique with this WorkflowStep.

GIT Add Workflow Step

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).

Configuration

You need to set up following additional options to use the plugin:

Repo Settings

GIT Commit Workflow Step

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).

Configuration

You need to set up following additional options to use the plugin:

Repo Settings