Updated jenkinsfile
ogclone-engine/pipeline/tag There was a failure building this commit Details

pull/14/head
Nicolas Arenas 2025-03-27 09:25:23 +01:00
parent 42b5e7a827
commit f0c6856a55
1 changed files with 9 additions and 8 deletions

View File

@ -50,17 +50,14 @@ pipeline {
}
stage('Build') {
stage('Build') {
steps {
dir("${env.BUILD_DIR}") {
sh '''
dpkg-buildpackage -us -uc
mkdir -p ../artifacts && mv ../*.deb ../*.changes ../*.buildinfo ../artifacts/
ssh aptly@172.17.8.68 "rm -rf /var/tmp/opengnsys/debian-repo/ogclient && mkdir -p /var/tmp/opengnsys/debian-repo/ogclient"
scp -r ../artifacts/* aptly@172.17.8.68:/var/tmp/opengnsys/debian-repo/ogclient
'''
script {
construirPaquete(env.BUILD_DIR, "../artifacts", "172.17.8.68", "/var/tmp/opengnsys/debian-repo/ogclient")
}
}
}
}
stage ('Publish to Debian Repository') {
when {
expression {
@ -69,7 +66,11 @@ pipeline {
}
agent { label 'debian-repo' }
steps {
sh "aptly repo add opengnsys-devel /var/tmp/opengnsys/debian-repo/ogclient/*.deb"
script {
// Construir el patrón de versión esperado en el nombre del paquete
def versionPattern = "${env.TAG_NAME}-${env.BUILD_NUMBER}"
publicarEnAptly('/var/tmp/opengnsys/debian-repo/ogclient', 'opengnsys-devel', versionPattern)
}
}
}
}