mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
Remove Utils#retrieveGitCoordinates
The methods a related to an outdated use case It was intended for getting the coordinates of a payload repo when the pipeline repo is specified in the pipeline job. That has been changed so that the pipeline (or at least a stub pipeline) is now always contained in the payload repo and the payload repo is always specified in the pipeline job itself.
This commit is contained in:
parent
1245528cfa
commit
44a3c8f571
@ -15,23 +15,3 @@ def getMandatoryParameter(Map map, paramName, defaultValue) {
|
||||
return paramValue
|
||||
|
||||
}
|
||||
|
||||
def retrieveGitCoordinates(script){
|
||||
def gitUrl = script.params.GIT_URL
|
||||
def gitBranch = script.params.GIT_BRANCH
|
||||
if(!gitUrl && !gitBranch) {
|
||||
echo "[INFO] Parameters 'GIT_URL' and 'GIT_BRANCH' not set in Jenkins job configuration. Assuming application to be built is contained in the same repository as this Jenkinsfile."
|
||||
gitUrl = scm.userRemoteConfigs[0].url
|
||||
gitBranch = scm.branches[0].name
|
||||
}
|
||||
else if(!gitBranch) {
|
||||
error "Parameter 'GIT_BRANCH' not set in Jenkins job configuration. Either set both GIT_URL and GIT_BRANCH of the application to be built as Jenkins job parameters or put this Jenkinsfile into the same repository as the application to be built."
|
||||
}
|
||||
else if(!gitUrl) {
|
||||
error "Parameter 'GIT_URL' not set in Jenkins job configuration. Either set both GIT_URL and GIT_BRANCH of the application to be built as Jenkins job parameters or put this Jenkinsfile into the same repository as the application to be built."
|
||||
}
|
||||
echo "[INFO] Building '${gitBranch}@${gitUrl}'."
|
||||
|
||||
return [url: gitUrl, branch: gitBranch]
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user