og-jenkins-shared-library/vars/construirPaquete.groovy

11 lines
420 B
Groovy

def call(String buildDir, String artifactsDir, String remoteHost, String remotePath) {
dir(buildDir) {
sh """
dpkg-buildpackage -us -uc
mkdir -p ${artifactsDir} && mv ../*.deb ../*.changes ../*.buildinfo ${artifactsDir}/
ssh aptly@${remoteHost} "rm -rf ${remotePath}/* && mkdir -p ${remotePath}"
scp -r ${artifactsDir}/* aptly@${remoteHost}:${remotePath}/
"""
}
}