Enhance sh to make curl use the same connection (#3825)
This commit is contained in:
parent
394f827f58
commit
2a9c19c12d
|
@ -67,10 +67,15 @@ stage('RPM Delivery') {
|
||||||
withCredentials([usernamePassword(credentialsId: 'nexus-credentials', passwordVariable: 'NEXUS_PASSWORD', usernameVariable: 'NEXUS_USERNAME')]) {
|
withCredentials([usernamePassword(credentialsId: 'nexus-credentials', passwordVariable: 'NEXUS_PASSWORD', usernameVariable: 'NEXUS_USERNAME')]) {
|
||||||
checkout scm
|
checkout scm
|
||||||
unstash "Debian11"
|
unstash "Debian11"
|
||||||
sh '''for i in $(echo *.deb)
|
sh '''for package in $(echo *.deb)
|
||||||
do
|
do
|
||||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD -H "Content-Type: multipart/form-data" --data-binary "@./$i" https://apt.centreon.com/repository/$REPO/
|
if [ -z "$FILELIST" ]
|
||||||
|
then
|
||||||
|
FILELIST=$file
|
||||||
|
fi
|
||||||
|
FILELIST=${FILELIST},$file
|
||||||
done
|
done
|
||||||
|
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD -H \"Content-Type: multipart/form-data\" -T \"{$FILELIST}\" https://apt.centreon.com/repository/$REPO/"
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue