From 5e82abef2ddae96b423d19328a437ecadbc58cc4 Mon Sep 17 00:00:00 2001 From: Per Goncalves da Silva Date: Sat, 19 Oct 2019 08:37:11 +0200 Subject: [PATCH] Adds restore static and dynamic methods, instead of making the library type a parameter --- cd/Jenkinsfile_utils.groovy | 12 ++++++++++++ cd/python/docker/Jenkins_pipeline.groovy | 2 +- cd/python/pypi/Jenkins_pipeline.groovy | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cd/Jenkinsfile_utils.groovy b/cd/Jenkinsfile_utils.groovy index 5182b04a3b5b..966f0a218057 100644 --- a/cd/Jenkinsfile_utils.groovy +++ b/cd/Jenkinsfile_utils.groovy @@ -160,6 +160,18 @@ def restore_artifact(variant, libtype) { } } + +// Restores the statically linked libmxnet for the given variant +def restore_static_libmxnet(variant) { + restore_artifact(variant, 'static') +} + + +// Restores the dynamically linked libmxnet for the given variant +def restore_dynamic_libmxnet(variant) { + restore_artifact(variant, 'dynamic') +} + // A generic pipeline that can be used by *most* CD jobs // It can be used when implementing the pipeline steps in the Jenkins_steps.groovy // script for a particular delivery channel. However, it should also implement the diff --git a/cd/python/docker/Jenkins_pipeline.groovy b/cd/python/docker/Jenkins_pipeline.groovy index a9a52e7372de..0d4925e00576 100644 --- a/cd/python/docker/Jenkins_pipeline.groovy +++ b/cd/python/docker/Jenkins_pipeline.groovy @@ -42,7 +42,7 @@ def get_environment(mxnet_variant) { def build(mxnet_variant) { ws("workspace/python_docker/${mxnet_variant}/${env.BUILD_NUMBER}") { ci_utils.init_git() - cd_utils.restore_artifact(mxnet_variant, 'static') + cd_utils.restore_static_libmxnet(mxnet_variant) // package wheel file def nvidia_docker = mxnet_variant.startsWith('cu') diff --git a/cd/python/pypi/Jenkins_pipeline.groovy b/cd/python/pypi/Jenkins_pipeline.groovy index bf8103270146..e9f172a570fe 100644 --- a/cd/python/pypi/Jenkins_pipeline.groovy +++ b/cd/python/pypi/Jenkins_pipeline.groovy @@ -45,7 +45,7 @@ def get_environment(mxnet_variant) { def build(mxnet_variant) { ws("workspace/python_pypi/${mxnet_variant}/${env.BUILD_NUMBER}") { ci_utils.init_git() - cd_utils.restore_artifact(mxnet_variant, 'static') + cd_utils.restore_static_libmxnet(mxnet_variant) // create wheel file def environment = get_environment(mxnet_variant)