Browse Source

Correction upload des paquets sur Vulcain

redesign-tamarin
wpetit 1 year ago
parent
commit
d7623132e5
2 changed files with 6 additions and 5 deletions
  1. +3
    -2
      vars/tamarin.groovy
  2. +3
    -3
      vars/vulcain.groovy

+ 3
- 2
vars/tamarin.groovy View File

@@ -1,6 +1,7 @@
def buildPackageWithCPKG(
String packageProfile = "debian",
String packageArch = "",
String packageBranch = "",
String baseImage = "",
String destDir = "./packages",
Boolean forceRebuild = false,
@@ -39,7 +40,7 @@ def buildPackageWithCPKG(
if (publishPackages) {
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(
String packageProfile = "debian",
String packageArch = "",
String baseImage = "",
String baseImage = "",
String destDir = "./packages",
Boolean forceRebuild = false
) {

+ 3
- 3
vars/vulcain.groovy View File

@@ -8,14 +8,14 @@ def publish(
if (!packagesBranch) {
packagesBranch = env.BRANCH_NAME
}
withCredentials([
sshUserPrivateKey(credentialsId: sshCredentialsId, keyFileVariable: 'VULCAIN_SSH_KEY', usernameVariable: 'VULCAIN_SSH_USER')
]) {
echo "Publishing packages to '${packagesEnv}/${packagesBranch}'"
sh """
SSH_ARGS='-i ${VULCAIN_SSH_KEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
ssh \$SSH_ARGS ${VULCAIN_SSH_USER}@${vulcainHost} mkdir -p '/home/${VULCAIN_SSH_USER}/packages/${packagesEnv}/${packagesBranch}'
scp \$SSH_ARGS -r ${packagesDir}/*.deb '${VULCAIN_SSH_USER}@${vulcainHost}:/home/${VULCAIN_SSH_USER}/packages/${packagesEnv}/${packagesBranch}/'
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}'
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}/'
"""
}
}

Loading…
Cancel
Save