Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Address review comments 2
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoabreu committed Aug 8, 2018
1 parent 33d838f commit 9d2c4b6
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 34 deletions.
36 changes: 18 additions & 18 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ node('mxnetlinux-cpu') {
utils.assign_node_labels(linux_cpu: 'mxnetlinux-cpu', linux_gpu: 'mxnetlinux-gpu', linux_gpu_p3: 'mxnetlinux-gpu-p3', windows_cpu: 'mxnetwindows-cpu', windows_gpu: 'mxnetwindows-gpu')

utils.main_wrapper(
handler: {
core_logic: {
stage('Sanity Check') {
parallel 'Lint': {
node(NODE_LINUX_CPU) {
Expand All @@ -113,7 +113,7 @@ handler: {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.docker_run('centos7_cpu', 'build_centos7_cpu', false)
utils.pack_lib('centos7_cpu')
utils.pack_lib('centos7_cpu', mx_lib)
}
}
}
Expand All @@ -124,7 +124,7 @@ handler: {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.docker_run('centos7_cpu', 'build_centos7_mkldnn', false)
utils.pack_lib('centos7_mkldnn')
utils.pack_lib('centos7_mkldnn', mx_lib)
}
}
}
Expand All @@ -135,7 +135,7 @@ handler: {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.docker_run('centos7_gpu', 'build_centos7_gpu', false)
utils.pack_lib('centos7_gpu')
utils.pack_lib('centos7_gpu', mx_lib)
}
}
}
Expand Down Expand Up @@ -410,7 +410,7 @@ handler: {
ws('workspace/ut-python2-cpu') {
try {
utils.init_git()
utils.unpack_lib('cpu')
utils.unpack_lib('cpu', mx_lib)
python2_ut('ubuntu_cpu')
utils.publish_test_coverage()
} finally {
Expand All @@ -426,7 +426,7 @@ handler: {
ws('workspace/ut-python3-cpu') {
try {
utils.init_git()
utils.unpack_lib('cpu')
utils.unpack_lib('cpu', mx_lib)
python3_ut('ubuntu_cpu')
utils.publish_test_coverage()
} finally {
Expand Down Expand Up @@ -589,7 +589,7 @@ handler: {
timeout(time: max_time, unit: 'MINUTES') {
try {
utils.init_git()
utils.unpack_lib('centos7_cpu')
utils.unpack_lib('centos7_cpu', mx_lib)
utils.docker_run('centos7_cpu', 'unittest_centos7_cpu', false)
utils.publish_test_coverage()
} finally {
Expand All @@ -606,7 +606,7 @@ handler: {
timeout(time: max_time, unit: 'MINUTES') {
try {
utils.init_git()
utils.unpack_lib('centos7_gpu')
utils.unpack_lib('centos7_gpu', mx_lib)
utils.docker_run('centos7_gpu', 'unittest_centos7_gpu', true)
utils.publish_test_coverage()
} finally {
Expand Down Expand Up @@ -645,7 +645,7 @@ handler: {
ws('workspace/ut-perl-cpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.unpack_lib('cpu')
utils.unpack_lib('cpu', mx_lib)
utils.docker_run('ubuntu_cpu', 'unittest_ubuntu_cpugpu_perl', false)
utils.publish_test_coverage()
}
Expand All @@ -657,7 +657,7 @@ handler: {
ws('workspace/ut-perl-gpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.unpack_lib('gpu')
utils.unpack_lib('gpu', mx_lib)
utils.docker_run('ubuntu_gpu', 'unittest_ubuntu_cpugpu_perl', true)
utils.publish_test_coverage()
}
Expand Down Expand Up @@ -693,7 +693,7 @@ handler: {
ws('workspace/ut-r-cpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.unpack_lib('cpu')
utils.unpack_lib('cpu', mx_lib)
utils.docker_run('ubuntu_cpu', 'unittest_ubuntu_cpu_R', false)
utils.publish_test_coverage()
}
Expand All @@ -705,7 +705,7 @@ handler: {
ws('workspace/ut-r-gpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.unpack_lib('gpu')
utils.unpack_lib('gpu', mx_lib)
utils.docker_run('ubuntu_gpu', 'unittest_ubuntu_gpu_R', true)
utils.publish_test_coverage()
}
Expand Down Expand Up @@ -796,7 +796,7 @@ handler: {
ws('workspace/it-onnx-cpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.unpack_lib('cpu')
utils.unpack_lib('cpu', mx_lib)
utils.docker_run('ubuntu_cpu', 'integrationtest_ubuntu_cpu_onnx', false)
utils.publish_test_coverage()
}
Expand All @@ -808,7 +808,7 @@ handler: {
ws('workspace/it-python-gpu') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.unpack_lib('gpu')
utils.unpack_lib('gpu', mx_lib)
utils.docker_run('ubuntu_gpu', 'integrationtest_ubuntu_gpu_python', true)
utils.publish_test_coverage()
}
Expand All @@ -821,7 +821,7 @@ handler: {
// ws('workspace/it-caffe') {
// timeout(time: max_time, unit: 'MINUTES') {
// utils.init_git()
// utils.unpack_lib('gpu')
// utils.unpack_lib('gpu', mx_lib)
// utils.docker_run('ubuntu_gpu', 'integrationtest_ubuntu_gpu_caffe', true)
// utils.publish_test_coverage()
// }
Expand All @@ -833,7 +833,7 @@ handler: {
ws('workspace/it-cpp-package') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.unpack_lib('gpu')
utils.unpack_lib('gpu', mx_lib)
unstash 'cpp_lenet'
unstash 'cpp_alexnet'
unstash 'cpp_googlenet'
Expand All @@ -855,7 +855,7 @@ handler: {
ws('workspace/it-dist-kvstore') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.unpack_lib('gpu')
utils.unpack_lib('gpu', mx_lib)
utils.docker_run('ubuntu_gpu', 'integrationtest_ubuntu_gpu_dist_kvstore', true)
utils.publish_test_coverage()
}
Expand All @@ -871,7 +871,7 @@ handler: {
ws('workspace/it-dist-kvstore') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.unpack_lib('cpu')
utils.unpack_lib('cpu', mx_lib)
utils.docker_run('ubuntu_cpu', 'integrationtest_ubuntu_cpu_dist_kvstore', false)
utils.publish_test_coverage()
}
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile_docker_cache
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ node('restricted-mxnetlinux-cpu') {
utils.assign_node_labels(linux_cpu: 'restricted-mxnetlinux-cpu', linux_gpu: 'restricted-mxnetlinux-gpu', linux_gpu_p3: 'restricted-mxnetlinux-gpu-p3', windows_cpu: 'restricted-mxnetwindows-cpu', windows_gpu: 'restricted-mxnetwindows-gpu')

utils.main_wrapper(
handler: {
core_logic: {
stage("Docker cache build & publish") {
node(NODE_LINUX_CPU) {
ws('workspace/docker_cache') {
Expand Down
20 changes: 11 additions & 9 deletions ci/Jenkinsfile_utils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def init_git_win() {
}

// pack libraries for later use
def pack_lib(name, libs=mx_lib) {
def pack_lib(name, libs) {
sh """
echo "Packing ${libs} into ${name}"
echo ${libs} | sed -e 's/,/ /g' | xargs md5sum
Expand All @@ -66,7 +66,7 @@ echo ${libs} | sed -e 's/,/ /g' | xargs md5sum
}

// unpack libraries saved before
def unpack_lib(name, libs=mx_lib) {
def unpack_lib(name, libs) {
unstash name
sh """
echo "Unpacked ${libs} from ${name}"
Expand Down Expand Up @@ -118,15 +118,17 @@ def assign_node_labels(args) {
NODE_WINDOWS_GPU = args.windows_gpu
}

// assign any caught errors here
err = null
def main_wrapper(args) {
// hander: Core logic
// failure_handler: Failure handler

// Main Jenkinsfile pipeline wrapper handler that allows to wrap core logic into a format
// that supports proper failure handling
// args:
// - core_logic: Jenkins pipeline containing core execution logic
// - failure_handler: Failure handler

// assign any caught errors here
err = null
try {
// Call actual handler
args['handler']()
args['core_logic']()

// set build status to success at the end
currentBuild.result = "SUCCESS"
Expand Down
4 changes: 2 additions & 2 deletions docs/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ node('restricted-mxnetlinux-cpu') {
utils.assign_node_labels(linux_cpu: 'restricted-mxnetlinux-cpu', linux_gpu: 'restricted-mxnetlinux-gpu', linux_gpu_p3: 'restricted-mxnetlinux-gpu-p3', windows_cpu: 'restricted-mxnetwindows-cpu', windows_gpu: 'restricted-mxnetwindows-gpu')

utils.main_wrapper(
handler: {
core_logic: {
stage('Build Docs') {
node(NODE_LINUX_CPU) {
ws('workspace/docs') {
Expand All @@ -50,4 +50,4 @@ failure_handler: {
emailext body: 'Generating the website has failed. Please view the build at ${BUILD_URL}', replyTo: '${EMAIL}', subject: '[WEBSITE FAILED] Build ${BUILD_NUMBER}', to: '${EMAIL}'
}
}
)
)
2 changes: 1 addition & 1 deletion tests/nightly/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ node('mxnetlinux-cpu') {
utils.assign_node_labels(linux_cpu: 'mxnetlinux-cpu', linux_gpu: 'mxnetlinux-gpu', linux_gpu_p3: 'mxnetlinux-gpu-p3', windows_cpu: 'mxnetwindows-cpu', windows_gpu: 'mxnetwindows-gpu')

utils.main_wrapper(
handler: {
core_logic: {
stage('NightlyTests'){
parallel 'CompilationWarnings: CPU': {
node(NODE_LINUX_CPU) {
Expand Down
2 changes: 1 addition & 1 deletion tests/nightly/JenkinsfileForBinaries
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ node('mxnetlinux-cpu) {
utils.assign_node_labels(linux_cpu: 'mxnetlinux-cpu', linux_gpu: 'mxnetlinux-gpu', linux_gpu_p3: 'mxnetlinux-gpu-p3', windows_cpu: 'mxnetwindows-cpu', windows_gpu: 'mxnetwindows-gpu')
utils.main_wrapper(
handler: {
core_logic: {
stage('Build') {
parallel 'GPU: CUDA9.1+cuDNN7': {
node(NODE_LINUX_CPU) {
Expand Down
2 changes: 1 addition & 1 deletion tests/nightly/broken_link_checker_test/JenkinsfileForBLC
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ node('mxnetlinux-cpu') {
utils.assign_node_labels(linux_cpu: 'mxnetlinux-cpu', linux_gpu: 'mxnetlinux-gpu', linux_gpu_p3: 'mxnetlinux-gpu-p3', windows_cpu: 'mxnetwindows-cpu', windows_gpu: 'mxnetwindows-gpu')

utils.main_wrapper(
handler: {
core_logic: {
stage('BLC'){
parallel 'BrokenLinkChecker: CPU': {
node(NODE_LINUX_CPU) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ node('restricted-mxnetlinux-cpu') {
utils.assign_node_labels(linux_cpu: 'restricted-mxnetlinux-cpu', linux_gpu: 'restricted-mxnetlinux-gpu', linux_gpu_p3: 'restricted-mxnetlinux-gpu-p3', windows_cpu: 'restricted-mxnetwindows-cpu', windows_gpu: 'restricted-mxnetwindows-gpu')

utils.main_wrapper(
handler: {
core_logic: {
stage('MBCC Train'){
node(NODE_LINUX_CPU) {
ws('workspace/modelBackwardsCompat') {
Expand Down

0 comments on commit 9d2c4b6

Please sign in to comment.