forked from Hg/htlle-da-vorlage
simplify git url
This commit is contained in:
parent
478488bdca
commit
0a9e95a679
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
@ -8,7 +8,7 @@ pipeline {
|
||||
parameters {
|
||||
string(name: 'USERNAME', defaultValue: 'Username', description: 'Benutzername')
|
||||
password(name: 'PASSWORD', defaultValue: '', description: 'Passwort')
|
||||
string(name: 'REPOSITORY', defaultValue: '.git', description: 'URL Git-Repository DA - default Wert: Baue Vorlage')
|
||||
string(name: 'REPOSITORY', defaultValue: '.git', description: 'URL Git-Repository DA \n default Wert: Baue Vorlage \n Ohne https://')
|
||||
string(name: 'BRANCH', defaultValue: 'master', description: 'Branch')
|
||||
string(name: 'PATH', defaultValue: '', description: "Pfad zur DA in git (z.B.: dipl/)")
|
||||
}
|
||||
@ -40,10 +40,8 @@ pipeline {
|
||||
steps {
|
||||
cleanWs()
|
||||
sh '''
|
||||
login_url_sub="https://"${params.USERNAME}":"${params.PASSWORD}"@"
|
||||
sub='https;//'
|
||||
echo ${login_url_sub}
|
||||
git clone --recurse-submodules --remote-submodules $(${params.REPOSITORY}/${sub}/${login_url_sub}) .
|
||||
login_url_sub="https://"${params.USERNAME}":"${params.PASSWORD}"@"${params.REPOSITORY}
|
||||
git clone --recurse-submodules --remote-submodules ${login_url_sub} .
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user