Feature 10296

Update dockerfiles to fetch dependencies from Artifactory
.deb and using pip3 -r instead of apt to resolve all upstream
depenencies

Update stage_3 to use URLs for artifactory packages instead
of apt server for installation of packages

Change-Id: I3abb1e1314862f386fb090cb18429f4283b0273d
Signed-off-by: beierlm <mark.beierl@canonical.com>
diff --git a/jenkins/ci-pipelines/ci_helper.groovy b/jenkins/ci-pipelines/ci_helper.groovy
index a2ededc..f343076 100644
--- a/jenkins/ci-pipelines/ci_helper.groovy
+++ b/jenkins/ci-pipelines/ci_helper.groovy
@@ -1,7 +1,7 @@
 /* Copyright 2017 Sandvine
  *
  * All Rights Reserved.
- * 
+ *
  *   Licensed under the Apache License, Version 2.0 (the "License"); you may
  *   not use this file except in compliance with the License. You may obtain
  *   a copy of the License at
@@ -35,10 +35,20 @@
      ]
     }"""
 
-    server.download(downloadSpec)
+    def results = server.download(downloadSpec)
+    // Save the list of URLs that we need to pass to the dockerfiles for build
+    def debian_packages = []
+    for ( result in results.getDependencies()) {
+        if (result.remotePath.contains(".deb")) {
+            debian_packages.add(result.remotePath)
+        }
+    }
+
     // workaround.  flatten repo to remove specific build num from the directory
-    sh "cp -R ${branch}/${build_num}/* ."
-    sh "rm -rf ${branch}/${build_num}"
+    sh "cp -R ${branch}/${build_number}/* ."
+    sh "rm -rf ${branch}/${build_number}"
+
+    return debian_packages
 }
 
 def get_env_value(build_env_file,key) {
@@ -70,10 +80,10 @@
     so_ip = lxc_run(container_name,"lxc list SO-ub -c 4|grep eth0 |awk '{print \$2}'")
     ro_ip = lxc_run(container_name,"lxc list RO -c 4|grep eth0 |awk '{print \$2}'")
     //container_ip = get_ip_from_container(container_name)
- 
+
     if ( source_rc ) {
         pre_source = "/tmp/" + source_rc.substring(source_rc.lastIndexOf('/')+1)
- 
+
         lxc_file_push(container_name,source_rc,pre_source)
         result = lxc_run(container_name, "sh -c '. ${pre_source}; make -C devops/systest OSM_HOSTNAME=${so_ip} OSM_RO_HOSTNAME=${ro_ip} ${test}'")
         echo result
@@ -157,7 +167,7 @@
         "buildName"          : buildInfo.name,
         "buildNumber"        : buildInfo.number,
         'targetRepo'         : 'osm-release',
-     
+
         // Optional parameters
         'comment'            : 'this is the promotion comment',
         'sourceRepo'         : "${repo_prefix}${mdg}",