From a48723935a2541cedc0dff822ef777ad93f2b456 Mon Sep 17 00:00:00 2001
From: Louis Maillard <louis.maillard@savoirfairelinux.com>
Date: Wed, 9 Oct 2024 16:58:14 -0400
Subject: [PATCH] packaging: upload artefacts to dhtnet.sfl.io

Upload generated artefacts on nigtly folder and keep the last 10 build
in Jenkins for now. Avoid using the exclude method used before
for artifact and switch to creating a publish/ folder as it's easier
for rsync.

Change-Id: I311a1ef457bb96b8106263e21d5e9abc2a5f43e3
---
 extras/packaging/Jenkinsfile | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/extras/packaging/Jenkinsfile b/extras/packaging/Jenkinsfile
index d1040fa..9f14524 100644
--- a/extras/packaging/Jenkinsfile
+++ b/extras/packaging/Jenkinsfile
@@ -1,3 +1,7 @@
+def JENKINS_SSH_KEY = '35cefd32-dd99-41b0-8312-0b386df306ff'
+def DL_SSH_KEY = '5825b39b-dfc6-435f-918e-12acc1f56221'
+def REMOTE_HOST = 'sshadmin@ring-repovm-01.mtl.sfl'
+
 pipeline {
     agent any
     triggers {
@@ -18,6 +22,9 @@ pipeline {
             string(name: 'GERRIT_REFSPEC',
                    defaultValue: 'refs/heads/dhtnet',
                    description: 'The Gerrit refspec to fetch.')
+            choice(name: 'PUBLISH_CHANNEL',
+                   choices: ['nightly', 'stable'],
+                   description: 'Nightly is for build created automaticaly or with low confidence level. After testing and careful review, you can run manual stable build.')
     }
     environment {
         PKG_NAME="dhtnet"
@@ -142,8 +149,8 @@ pipeline {
     }
     post {
         success {
-            dir('extras/packaging') {
-                archiveArtifacts artifacts: 'ubuntu-*/dhtnet_*.deb, debian-*/dhtnet_*.deb',
+            dir('extras/packaging/publish') {
+                archiveArtifacts artifacts: '**/*',
                                  caseSensitive: false
             }
         }
-- 
GitLab