From 565c04e725836bccab7a0fccbd35cb404f56b238 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Mon, 5 Dec 2022 09:55:16 -0500
Subject: [PATCH] jenkinsfile: get correct commit

Change-Id: I3166779843432a2a92781b35befc105c388374b4
---
 extras/ci/client-qt-gnulinux/Jenkinsfile | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/extras/ci/client-qt-gnulinux/Jenkinsfile b/extras/ci/client-qt-gnulinux/Jenkinsfile
index 53893bf26..46575abc7 100644
--- a/extras/ci/client-qt-gnulinux/Jenkinsfile
+++ b/extras/ci/client-qt-gnulinux/Jenkinsfile
@@ -53,10 +53,22 @@ pipeline {
 
     stages {
         stage('SCM Checkout') {
+            // Wipe workspace and fetch jami-daemon
+            checkout changelog: true, poll: false,
+                scm: [$class: 'GitSCM',
+                    branches: [[name: 'FETCH_HEAD']],
+                    doGenerateSubmoduleConfigurations: false,
+                    extensions: [
+                        [$class: 'CloneOption', noTags: true, reference: '', shallow: true],
+                        [$class: 'WipeWorkspace']],
+                    submoduleCfg: [],
+                    userRemoteConfigs: [[refspec: '${GERRIT_REFSPEC}', url: 'https://${JAMI_GERRIT_URL}/jami-client-qt']]]
+        }
+
+        stage('Init repository') {
             steps {
                 script {
                     sh """
-                        git fetch ssh://jenkins@review.jami.net:29420/jami-client-qt $GERRIT_REFSPEC && git checkout FETCH_HEAD
                         git rev-parse HEAD
                         git submodule update --init --recursive
                     """
@@ -94,6 +106,7 @@ pipeline {
                                     cmake .. -DENABLE_TESTS=True
                                     make -j${cpuCount}
                                 """)
+                                // Run tests
                                 exec_cmd("""
                                     cd ${dockerTopDir}
                                     cd tests/qml/src
-- 
GitLab