Back to Top

Git Repository Operations

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

Git Repository Operations

Description

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.

Parameters

The following parameters may be set on this task:

Table of task Parameters

Name Type Default Value Optional Description
branch java.lang.String master true The remote Git branch name. If unset, defaults to 'master'.
commitComment java.lang.String Committing changes from RapidDeploy true The comment to add to the Git commit. Although this field can be empty, it is strongly recommended by Git to fill it because providing a meaningful commit message is part of a good development practice and a good repository stewardship.
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 the deleteFile, createFile and makeDirectory operations.
gitPassword java.lang.String   false Password to use to authenticate when connecting to Git (if required).
gitRepositoryUrl java.lang.String http://scm.mycompany.com/git/path/to/repo false 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 Repository directory will reside. This location will be used to perform the Git "checkout" operation. If the remote and local repositories 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 and makeDirectory. The deleteFile, createFile and makeDirectory options require the filePath parameter.
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 '${' and 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" parameter.
retryInterval java.lang.String 5000 false The retry interval in milliseconds. 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 it has failed or not.