Correction upload des paquets sur Vulcain
This commit is contained in:
parent
81bb434d06
commit
d7623132e5
|
@ -1,6 +1,7 @@
|
||||||
def buildPackageWithCPKG(
|
def buildPackageWithCPKG(
|
||||||
String packageProfile = "debian",
|
String packageProfile = "debian",
|
||||||
String packageArch = "",
|
String packageArch = "",
|
||||||
|
String packageBranch = "",
|
||||||
String baseImage = "",
|
String baseImage = "",
|
||||||
String destDir = "./packages",
|
String destDir = "./packages",
|
||||||
Boolean forceRebuild = false,
|
Boolean forceRebuild = false,
|
||||||
|
@ -39,7 +40,7 @@ def buildPackageWithCPKG(
|
||||||
|
|
||||||
if (publishPackages) {
|
if (publishPackages) {
|
||||||
stage("Publish ${packageEnv} packages (version ${packageVersion}) on Vulcain") {
|
stage("Publish ${packageEnv} packages (version ${packageVersion}) on Vulcain") {
|
||||||
vulcain.publish(destDir, packageEnv, packageDistrib.replace('-', '/'))
|
vulcain.publish(destDir, packageEnv, packageBranch)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +52,7 @@ def buildPackageWithCPKG(
|
||||||
def buildPackage(
|
def buildPackage(
|
||||||
String packageProfile = "debian",
|
String packageProfile = "debian",
|
||||||
String packageArch = "",
|
String packageArch = "",
|
||||||
String baseImage = "",
|
String baseImage = "",
|
||||||
String destDir = "./packages",
|
String destDir = "./packages",
|
||||||
Boolean forceRebuild = false
|
Boolean forceRebuild = false
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -8,14 +8,14 @@ def publish(
|
||||||
if (!packagesBranch) {
|
if (!packagesBranch) {
|
||||||
packagesBranch = env.BRANCH_NAME
|
packagesBranch = env.BRANCH_NAME
|
||||||
}
|
}
|
||||||
|
|
||||||
withCredentials([
|
withCredentials([
|
||||||
sshUserPrivateKey(credentialsId: sshCredentialsId, keyFileVariable: 'VULCAIN_SSH_KEY', usernameVariable: 'VULCAIN_SSH_USER')
|
sshUserPrivateKey(credentialsId: sshCredentialsId, keyFileVariable: 'VULCAIN_SSH_KEY', usernameVariable: 'VULCAIN_SSH_USER')
|
||||||
]) {
|
]) {
|
||||||
echo "Publishing packages to '${packagesEnv}/${packagesBranch}'"
|
echo "Publishing packages to '${packagesEnv}/${packagesBranch}'"
|
||||||
sh """
|
sh """
|
||||||
SSH_ARGS='-i ${VULCAIN_SSH_KEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
|
ssh -i '${VULCAIN_SSH_KEY}' -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null '${VULCAIN_SSH_USER}@${vulcainHost}' mkdir -p '/home/${VULCAIN_SSH_USER}/packages/${packagesEnv}/${packagesBranch}'
|
||||||
ssh \$SSH_ARGS ${VULCAIN_SSH_USER}@${vulcainHost} mkdir -p '/home/${VULCAIN_SSH_USER}/packages/${packagesEnv}/${packagesBranch}'
|
scp -i '${VULCAIN_SSH_KEY}' -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -r ${packagesDir}/*.deb '${VULCAIN_SSH_USER}@${vulcainHost}:/home/${VULCAIN_SSH_USER}/packages/${packagesEnv}/${packagesBranch}/'
|
||||||
scp \$SSH_ARGS -r ${packagesDir}/*.deb '${VULCAIN_SSH_USER}@${vulcainHost}:/home/${VULCAIN_SSH_USER}/packages/${packagesEnv}/${packagesBranch}/'
|
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue