diff --git a/Jenkinsfile b/Jenkinsfile index 92a58a7..88585ed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -46,6 +46,7 @@ pipeline { sh ''' mkdir -p build cd build + export CPACK_PACKAGE_VERSION_PATCH="${BUILD_NUMBER}" cmake .. -G Ninja ninja ''' @@ -60,6 +61,20 @@ pipeline { } } + stage("Upload package to Aptly") { + steps { + sshagent (credentials : ['aptly-key']) { + withCredentials([string(credentialsId: 'aptly-gpg-passphrase', variable: 'GPG_PASSPHRASE')]) { + sh ''' + aptly=72.17.8.68 + scp OGBrowser-2.0.${BUILD_NUMBER}-Linux.deb aptly@${aptly}:/tmp + ssh aptly@${aptly} -o StrictHostKeyChecking=no "aptly repo add ogbrowser /tmp/OGBrowser-2.0.${BUILD_NUMBER}-Linux.deb" + ssh aptly@${aptly} -o StrictHostKeyChecking=no "aptly publish repo --passphrase=\"${GPG_PASSPHRASE}\" -- ogbrowser" + ''' + } + } + } + } } post { always {