This part of the pipeline provides utility steps for common GIT operations.
mirrorRepository(String srcUrl, String targetUrl, List<String> srcCredentialIds = null, List<String> targetCredentialIds = null)
This step is a combination of:
This steps mirrors a GIT repository from srcUrl
to targetUrl
When no
srcCredentialIds
or targetCredentialIds
are provided a auto lookup
of the SSH or http(s) credentials will be performed.
mirrorRepositoryToRemote(String srcRepoPath, GitRepository targetRepo, List<String> targetCredentialIds = null)
Mirrors a local bare cloned repository form $WORKSPACE/$srcRepoPath
to
the targetRepo
. When no targetCredentialIds
are provided a auto
lookup of the SSH or http(s) credentials will be performed.
Mirrors the srcRepo
to the current workspace.
When no srcCredentialIds
are provided a auto lookup of the SSH or http(s) credentials will be performed.
Utility function to get the fetch origin from a git remote list (git remote -v
). When no remotes
are provided the step will try to
retrieve them by using the internal function _getRemotes
which
basically executes a git remote -v
.
Utility function to get the push origin from a git remote list (git remote -v
). When no remotes
are provided the step will try to
retrieve them by using the internal function _getRemotes
which
basically executes a git remote -v
.