message: Finish CD pipeline
diff: @@ -1710,9 +1710,12 @@ def publishDebRCtoStable(testEnv, packageName, folder, version, stashName, moveD
  }
  }
  -def buildTestEnv(file, env_name, name="libindy") {
  +def buildTestEnv(file, env_name, name="libindy", prebuilt_images=[]) {
  dir('libindy') {
  echo "${env_name} Build test environment"
  + for (entry in mapToList(prebuilt_images)) {
  + dockerBuild(entry[0], entry[1])
  + }
  return dockerBuild(name, file)
  }
  }
  @@ -1836,7 +1839,7 @@ def linuxModuleTesting(file, env_name, network_name, module_tester) {
  linuxModuleTesting(file, env_name, network_name, module_tester, 'ubuntu')
  }
  -def linuxModuleTesting(file, env_name, network_name, module_tester, node_label, image_name="libindy") {
  +def linuxModuleTesting(file, env_name, network_name, module_tester, node_label, image_name="libindy", prebuilt_images = []) {
  node(node_label) {
  cleanWs()
  def poolInst
  @@ -1846,7 +1849,7 @@ def linuxModuleTesting(file, env_name, network_name, module_tester, node_label,
  poolInst = openPool(env_name, network_name)
  - def testEnv = buildTestEnv(file, env_name, image_name)
  + def testEnv = buildTestEnv(file, env_name, image_name, prebuilt_images)
  module_tester(env_name, network_name, testEnv)
  } finally {
  @@ -1860,8 +1863,7 @@ def androidTesting() {
  network_name = "pool_network"
  parallel([
  "${env_name}-android-test" : {
  - dockerBuild("libindy")
  - linuxModuleTesting("ci/ubuntu.dockerfile ci", env_name, network_name, this.&linuxAndroidOnEmulatorTesting, 'android', "android")
  + linuxModuleTesting("ci/android.dockerfile ci", env_name, network_name, this.&linuxAndroidOnEmulatorTesting, 'android', "android", ["libindy": 'ci/ubuntu.dockerfile ci'])
  },
  "${env_name}-android-building": { androidBuildAsTesting() }
  ])
  @@ -1880,8 +1882,9 @@ def androidBuildAsTesting() {
  def libvcxVersion = getSrcVersion("vcx/libvcx")
  echo 'Building android binaries: Building docker image'
  - buildEnv = dockerHelpers.build('indy-sdk', 'libindy/ci/ubuntu.dockerfile libindy/ci')
  - vcxBuildEnv = dockerHelpers.build('indy-sdk', 'libindy/ci/ubuntu.dockerfile libindy/ci')
  + dockerHelpers.build('libindy-test', 'libindy/ci/ubuntu.dockerfile libindy/ci')
  + buildEnv = dockerHelpers.build('indy-sdk', 'libindy/ci/android.dockerfile libindy/ci')
  + vcxBuildEnv = dockerHelpers.build('indy-sdk', 'libindy/ci/android.dockerfile libindy/ci')
  sh 'chmod -R 777 libindy/'
  sh 'chmod -R 777 libindy/ci/'
  @@ -1902,3 +1905,10 @@ def setupBrewPackages() {
  sh "brew switch openssl 1.0.2q"
  sh "brew switch zeromq 4.2.3"
  }
  +
  +@NonCPS
  +List<List<?>> mapToList(Map map) {
  + return map.collect { it ->
  + [it.key, it.value]
  + }
  +}
  \ No newline at end of file
  