Back to Top

Git Repository Operations

Class Name com.midvision.rapiddeploy.plugins.scm.gitmanual.task.RepositoryOperations
Category Git

Git Repository Operations


Perform a task against the Git repository. Select from one of:

clone - Clone a folder from Git. The local working copy will be created. If the local working copy already exists, it is updated using init.

init - Update existing local working copy from Git. You will get an error if the local working copy does not exist.

commit - Commit the contents of the local working copy to the repository.

getRevision - Get the current revision from the local working copy.

resynchronise - Delete the local working copy (if it exists) and then perform a new clone operation.

deleteFile - Utility operation to delete a file or folder (recursively) from the local working copy Equivalent to the 'Delete' task.

createFile - Utility operation to create an empty file in the local working copy. Equivalent to using the 'Touch' task. If the file exists, this operation is ignored.

makeDirectory - Utility operation to make a directory in the local working copy. Equivalent to using the 'Make Directory' task. If the folder exists, this operation is ignored.

The createFile, deleteFile, makeDirectory options require a filePath entry.


The following parameters may be set on this task:

Table of task Parameters

Name Type Default Value Optional Description
branch java.lang.String master false The remote Git branch name. If unset, defaults to 'master'
failOnError java.lang.Boolean true false This task will not fail the deployment on error if set to false.
filePath java.lang.String   true The path to the file. Required for addEntry, deleteEntry, createFile, makeDirectory operations.
gitPassword java.lang.String   false Password to use to authenticate when connecting to Git (if required).
gitRepositoryUrl java.lang.String false The Git Repository URL of the RapidDeploy project. This is not the URL to the top level of the repository, rather the URL to the top level of the location of interest in the repository.
gitUsername java.lang.String   false Username to use to authenticate when connecting to Git (if required).
gitWorkingDirectory java.lang.String /path/to/local/working/copy false The location on the file system where the local Git Working Copy directory will reside. This location will be used to perform an Git "Checkout" operation. The Git project artifacts will be copied to this location. If the repository and working copy should get out of sync, delete this directory. It will be recreated on the next checkout operation.
operation java.util.List clone false The operation to perform. One of: init, clone, commit, getRevision, resynchronise, deleteFile, createFile, makeDirectory The deleteFile, createFile, makeDirectory require a filePath entry.
outputParameter java.lang.String ${gitOutput} false The name of the output parameter, which can pass the return value from the task. The task output will be the Git output. Define a unique parameter name starting with '${', ending with '}' for the whole orchestration (latter tasks can override the parameter value if the same parameter name is specified). You can refer to this parameter in any task below in the tasklist, as an input parameter ${gitOutput}.
retryCount java.lang.String 1 false The retry count. The number of times to retry a Git call, before failing. The time between successive retry calls is set with the "retryInterval" setting
retryInterval java.lang.String 5000 false The retry interval in milliseconds. If set, the amount of time to wait before retrying a Git call.
skipOnFailure java.lang.String Previous Task Name true Skip current task based on the name of the previous task whether has failed or not.