From 9602b5f17a27d7464b7ea7eb53157329021b5d16 Mon Sep 17 00:00:00 2001 From: Marco de Abreu Date: Wed, 8 Aug 2018 22:54:18 +0200 Subject: [PATCH] Fix jenkinsfile syntax errors (#12096) --- ci/Jenkinsfile_docker_cache | 3 +- docs/Jenkinsfile | 2 +- tests/nightly/Jenkinsfile | 40 +++++++++--------- tests/nightly/JenkinsfileForBinaries | 42 +++++++++---------- .../JenkinsfileForBLC | 4 +- .../JenkinsfileForMBCC | 14 +++---- 6 files changed, 53 insertions(+), 52 deletions(-) diff --git a/ci/Jenkinsfile_docker_cache b/ci/Jenkinsfile_docker_cache index e8556c625ff4..77f0122f944e 100644 --- a/ci/Jenkinsfile_docker_cache +++ b/ci/Jenkinsfile_docker_cache @@ -36,12 +36,13 @@ core_logic: { node(NODE_LINUX_CPU) { ws('workspace/docker_cache') { timeout(time: total_timeout, unit: 'MINUTES') { - init_git() + utils.init_git() sh "ci/docker_cache.py --docker-registry ${env.DOCKER_CACHE_REGISTRY}" } } } } +} , failure_handler: { diff --git a/docs/Jenkinsfile b/docs/Jenkinsfile index 039b794914bb..0e1dce2dbbe5 100644 --- a/docs/Jenkinsfile +++ b/docs/Jenkinsfile @@ -35,7 +35,7 @@ core_logic: { stage('Build Docs') { node(NODE_LINUX_CPU) { ws('workspace/docs') { - init_git() + utils.init_git() timeout(time: max_time, unit: 'MINUTES') { sh "ci/build.py -p ubuntu_cpu --docker-registry ${env.DOCKER_CACHE_REGISTRY} --docker-build-retries 3 /work/runtime_functions.sh build_docs ${params.tags_to_build} ${params.tag_list} ${params.tag_default} ${params.domain}" archiveArtifacts 'docs/build_version_doc/artifacts.tgz' diff --git a/tests/nightly/Jenkinsfile b/tests/nightly/Jenkinsfile index 29db3b1a37be..35996fbcd32d 100755 --- a/tests/nightly/Jenkinsfile +++ b/tests/nightly/Jenkinsfile @@ -33,19 +33,19 @@ core_logic: { parallel 'CompilationWarnings: CPU': { node(NODE_LINUX_CPU) { ws('workspace/nt-compilationTest') { - init_git() - docker_run('ubuntu_nightly_cpu', 'nightly_test_compilation_warning', false) + utils.init_git() + utils.docker_run('ubuntu_nightly_cpu', 'nightly_test_compilation_warning', false) } } }, 'InstallationGuide: CPU': { node(NODE_LINUX_CPU) { ws('workspace/nt-Installation-cpu') { - init_git() + utils.init_git() //Some install guide tests are currently diabled and tracked here: //1. https://github.com/apache/incubator-mxnet/issues/11369 //2. https://github.com/apache/incubator-mxnet/issues/11288 - docker_run('ubuntu_base_cpu', 'nightly_test_installation ubuntu_python_cpu_virtualenv', false) + utils.docker_run('ubuntu_base_cpu', 'nightly_test_installation ubuntu_python_cpu_virtualenv', false) //docker_run('ubuntu_base_cpu', 'nightly_test_installation ubuntu_python_cpu_pip', false) //docker_run('ubuntu_base_cpu', 'nightly_test_installation ubuntu_python_cpu_docker', false) //docker_run('ubuntu_base_cpu', 'nightly_test_installation ubuntu_python_cpu_source', false) @@ -55,69 +55,69 @@ core_logic: { 'InstallationGuide: GPU': { node(NODE_LINUX_GPU) { ws('workspace/nt-Installation-gpu') { - init_git() + utils.init_git() //Some install guide tests are currently diabled and tracked here: //1. https://github.com/apache/incubator-mxnet/issues/11369 //2. https://github.com/apache/incubator-mxnet/issues/11288 - docker_run('ubuntu_base_gpu', 'nightly_test_installation ubuntu_python_gpu_virtualenv', true) + utils.docker_run('ubuntu_base_gpu', 'nightly_test_installation ubuntu_python_gpu_virtualenv', true) //docker_run('ubuntu_base_gpu', 'nightly_test_installation ubuntu_python_gpu_pip', true) //docker_run('ubuntu_base_gpu', 'nightly_test_installation ubuntu_python_gpu_docker', true) - docker_run('ubuntu_base_gpu', 'nightly_test_installation ubuntu_python_gpu_source', true) + utils.docker_run('ubuntu_base_gpu', 'nightly_test_installation ubuntu_python_gpu_source', true) } } }, 'PipTest: GPU': { node(NODE_LINUX_GPU) { ws('workspace/nt-pipTest') { - init_git() + utils.init_git() } } }, 'Amalgamation-atlas: CPU': { node(NODE_LINUX_CPU) { ws('workspace/nt-amalgamation1') { - init_git() - docker_run('ubuntu_nightly_cpu', 'nightly_test_amalgamation USE_BLAS=atlas', false) + utils.init_git() + utils.docker_run('ubuntu_nightly_cpu', 'nightly_test_amalgamation USE_BLAS=atlas', false) } } }, 'Amalgamation-atlas-min: CPU': { node(NODE_LINUX_CPU) { ws('workspace/nt-amalgamation2') { - init_git() - docker_run('ubuntu_nightly_cpu', 'nightly_test_amalgamation USE_BLAS=atlas MIN=1', false) + utils.init_git() + utils.docker_run('ubuntu_nightly_cpu', 'nightly_test_amalgamation USE_BLAS=atlas MIN=1', false) } } }, 'Amalgamation-atlas-mkl: CPU': { node(NODE_LINUX_CPU) { ws('workspace/nt-amalgamation3') { - init_git() - docker_run('ubuntu_nightly_cpu', 'nightly_test_amalgamation USE_BLAS=atlas MSHADOW_USE_MKL=1', false) + utils.init_git() + utils.docker_run('ubuntu_nightly_cpu', 'nightly_test_amalgamation USE_BLAS=atlas MSHADOW_USE_MKL=1', false) } } }, 'Amalgamation-atlas-cuda: CPU': { node(NODE_LINUX_CPU) { ws('workspace/nt-amalgamation4') { - init_git() - docker_run('ubuntu_nightly_cpu', 'nightly_test_amalgamation USE_BLAS=atlas MSHADOW_USE_CUDA=1', false) + utils.init_git() + utils.docker_run('ubuntu_nightly_cpu', 'nightly_test_amalgamation USE_BLAS=atlas MSHADOW_USE_CUDA=1', false) } } }, 'Amalgamation-atlas-openmp: CPU': { node(NODE_LINUX_CPU) { ws('workspace/nt-amalgamation5') { - init_git() - docker_run('ubuntu_nightly_cpu', 'nightly_test_amalgamation USE_BLAS=atlas DISABLE_OPENMP=0', false) + utils.init_git() + utils.docker_run('ubuntu_nightly_cpu', 'nightly_test_amalgamation USE_BLAS=atlas DISABLE_OPENMP=0', false) } } }, 'MXNetJS: CPU': { node(NODE_LINUX_CPU) { ws('workspace/nt-mxnetjs') { - init_git() - docker_run('ubuntu_nightly_cpu', 'nightly_test_javascript', false) + utils.init_git() + utils.docker_run('ubuntu_nightly_cpu', 'nightly_test_javascript', false) } } } diff --git a/tests/nightly/JenkinsfileForBinaries b/tests/nightly/JenkinsfileForBinaries index c8f9ed6fab31..63914b11cb46 100755 --- a/tests/nightly/JenkinsfileForBinaries +++ b/tests/nightly/JenkinsfileForBinaries @@ -33,10 +33,10 @@ core_logic: { parallel 'GPU: CUDA9.1+cuDNN7': { node(NODE_LINUX_CPU) { ws('workspace/build-gpu') { - init_git() + utils.init_git() //sh "ci/build.py --platform ubuntu_build_cuda /work/runtime_functions.sh build_ubuntu_gpu_cuda91_cudnn7" - docker_run('ubuntu_build_cuda', 'build_ubuntu_gpu_cuda91_cudnn7', false) - pack_lib('gpu', mx_lib) + utils.docker_run('ubuntu_build_cuda', 'build_ubuntu_gpu_cuda91_cudnn7', false) + utils.pack_lib('gpu', mx_lib) } } } @@ -46,54 +46,54 @@ core_logic: { parallel 'ImageClassification: GPU': { node(NODE_LINUX_GPU) { ws('workspace/nt-ImageClassificationTest') { - init_git() - unpack_lib('gpu', mx_lib) - docker_run('ubuntu_nightly_gpu', 'nightly_test_image_classification', true) + utils.init_git() + utils.unpack_lib('gpu', mx_lib) + utils.docker_run('ubuntu_nightly_gpu', 'nightly_test_image_classification', true) } } }, 'KVStore_SingleNode: GPU': { node('mxnetlinux-gpu-p3-8xlarge') { ws('workspace/nt-KVStoreTest') { - init_git() - unpack_lib('gpu', mx_lib) - docker_run('ubuntu_nightly_gpu', 'nightly_test_KVStore_singleNode', true) + utils.init_git() + utils.unpack_lib('gpu', mx_lib) + utils.docker_run('ubuntu_nightly_gpu', 'nightly_test_KVStore_singleNode', true) } } }, 'StraightDope: Python2 Single-GPU': { node(NODE_LINUX_GPU_P3) { ws('workspace/straight_dope-single_gpu') { - init_git() - unpack_lib('gpu', mx_lib) - docker_run('ubuntu_nightly_gpu', 'nightly_straight_dope_python2_single_gpu_tests', true) + utils.init_git() + utils.unpack_lib('gpu', mx_lib) + utils.docker_run('ubuntu_nightly_gpu', 'nightly_straight_dope_python2_single_gpu_tests', true) } } }, 'StraightDope: Python2 Multi-GPU': { node(NODE_LINUX_GPU) { ws('workspace/straight_dope-multi_gpu') { - init_git() - unpack_lib('gpu', mx_lib) - docker_run('ubuntu_nightly_gpu', 'nightly_straight_dope_python2_multi_gpu_tests', true) + utils.init_git() + utils.unpack_lib('gpu', mx_lib) + utils.docker_run('ubuntu_nightly_gpu', 'nightly_straight_dope_python2_multi_gpu_tests', true) } } }, 'StraightDope: Python3 Single-GPU': { node(NODE_LINUX_GPU_P3) { ws('workspace/straight_dope-single_gpu') { - init_git() - unpack_lib('gpu', mx_lib) - docker_run('ubuntu_nightly_gpu', 'nightly_straight_dope_python3_single_gpu_tests', true) + utils.init_git() + utils.unpack_lib('gpu', mx_lib) + utils.docker_run('ubuntu_nightly_gpu', 'nightly_straight_dope_python3_single_gpu_tests', true) } } }, 'StraightDope: Python3 Multi-GPU': { node(NODE_LINUX_GPU) { ws('workspace/straight_dope-multi_gpu') { - init_git() - unpack_lib('gpu', mx_lib) - docker_run('ubuntu_nightly_gpu', 'nightly_straight_dope_python3_multi_gpu_tests', true) + utils.init_git() + utils.unpack_lib('gpu', mx_lib) + utils.docker_run('ubuntu_nightly_gpu', 'nightly_straight_dope_python3_multi_gpu_tests', true) } } } diff --git a/tests/nightly/broken_link_checker_test/JenkinsfileForBLC b/tests/nightly/broken_link_checker_test/JenkinsfileForBLC index 43b22a79270e..782bf74c9ccc 100755 --- a/tests/nightly/broken_link_checker_test/JenkinsfileForBLC +++ b/tests/nightly/broken_link_checker_test/JenkinsfileForBLC @@ -33,9 +33,9 @@ core_logic: { ws('workspace/brokenLinkChecker') { timeout(time: 60, unit: 'MINUTES') { try { - init_git() + utils.init_git() sh 'aws s3 cp s3://mxnet-ci-prod-slave-data/url_list.txt ./tests/nightly/broken_link_checker_test/url_list.txt' - docker_run('ubuntu_blc', 'broken_link_checker', false) + utils.docker_run('ubuntu_blc', 'broken_link_checker', false) } finally { sh "echo Storing the new url_list.txt to S3 bucket" sh 'aws s3 cp ./tests/nightly/broken_link_checker_test/url_list.txt s3://mxnet-ci-prod-slave-data/url_list.txt' diff --git a/tests/nightly/model_backwards_compatibility_check/JenkinsfileForMBCC b/tests/nightly/model_backwards_compatibility_check/JenkinsfileForMBCC index 00e4564e7459..d5c5b8d0067f 100644 --- a/tests/nightly/model_backwards_compatibility_check/JenkinsfileForMBCC +++ b/tests/nightly/model_backwards_compatibility_check/JenkinsfileForMBCC @@ -32,9 +32,9 @@ core_logic: { stage('MBCC Train'){ node(NODE_LINUX_CPU) { ws('workspace/modelBackwardsCompat') { - init_git() + utils.init_git() // Train models on older versions - docker_run('ubuntu_nightly_cpu', 'nightly_model_backwards_compat_train', false) + utils.docker_run('ubuntu_nightly_cpu', 'nightly_model_backwards_compat_train', false) // upload files to S3 here outside of the docker environment sh "./tests/nightly/model_backwards_compatibility_check/upload_models_to_s3.sh" } @@ -44,9 +44,9 @@ core_logic: { stage('MXNet Build'){ node(NODE_LINUX_CPU) { ws('workspace/build-cpu') { - init_git() - docker_run('ubuntu_cpu','build_ubuntu_cpu', false) - pack_lib('cpu', mx_lib) + utils.init_git() + utils.docker_run('ubuntu_cpu','build_ubuntu_cpu', false) + utils.pack_lib('cpu', mx_lib) } } } @@ -54,10 +54,10 @@ core_logic: { stage('MBCC Inference'){ node(NODE_LINUX_CPU) { ws('workspace/modelBackwardsCompat') { - init_git() + utils.init_git() unpack_lib('cpu', mx_lib) // Perform inference on the latest version of MXNet - docker_run('ubuntu_nightly_cpu', 'nightly_model_backwards_compat_test', false) + utils.docker_run('ubuntu_nightly_cpu', 'nightly_model_backwards_compat_test', false) } } }