New process for uploading built debs to a repo
[osm/SO.git] / Jenkinsfile
index 245308c..684a780 100644 (file)
@@ -13,17 +13,19 @@ pipeline {
                        }
                }
                stage("Repo Component") {
-                       agent any
+                       agent {
+                               docker {
+                                       image 'debian:stable'
+                                       args '--net=deb-repo-master'
+                               }
+                       }
                        steps {
                                unstash "deb-files"
                                sh '''
-                                       mkdir -p pool/SO
-                                       mv .build/*.deb pool/SO/
-                                       mkdir -p dists/$RELEASE/unstable/SO/binary-amd64/
-                                       apt-ftparchive packages pool/SO > dists/$RELEASE/unstable/SO/binary-amd64/Packages
-                                       gzip -9fk dists/$RELEASE/unstable/SO/binary-amd64/Packages
+                                       apt-get update && apt-get -y install rsync
+                                       rsync -Pr .build/*.deb deb-repo-master:/var/lib/deb-repo/ReleaseONE/incoming/unstable/SO/
+                                       ssh deb-repo-master 'process-incoming'
                                        '''
-                               archiveArtifacts artifacts: "dists/**,pool/SO/*.deb"
                        }
                }
        }