|
| 1 | +// -*- mode: groovy -*- |
| 2 | + |
| 3 | +// Licensed to the Apache Software Foundation (ASF) under one |
| 4 | +// or more contributor license agreements. See the NOTICE file |
| 5 | +// distributed with this work for additional information |
| 6 | +// regarding copyright ownership. The ASF licenses this file |
| 7 | +// to you under the Apache License, Version 2.0 (the |
| 8 | +// "License"); you may not use this file except in compliance |
| 9 | +// with the License. You may obtain a copy of the License at |
| 10 | +// |
| 11 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +// |
| 13 | +// Unless required by applicable law or agreed to in writing, |
| 14 | +// software distributed under the License is distributed on an |
| 15 | +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 16 | +// KIND, either express or implied. See the License for the |
| 17 | +// specific language governing permissions and limitations |
| 18 | +// under the License. |
| 19 | +// |
| 20 | +// Jenkins pipeline |
| 21 | +// See documents at https://jenkins.io/doc/book/pipeline/jenkinsfile/ |
| 22 | +// This pipeline will publish to https://mxnet-beta.staged.apache.org/ |
| 23 | + |
| 24 | +// timeout in minutes |
| 25 | +max_time = 180 |
| 26 | + |
| 27 | +node('restricted-utility') { |
| 28 | + // Loading the utilities requires a node context unfortunately |
| 29 | + checkout scm |
| 30 | + utils = load('ci/Jenkinsfile_utils.groovy') |
| 31 | + custom_steps = load('ci/jenkins/Jenkins_steps.groovy') |
| 32 | +} |
| 33 | + |
| 34 | +utils.assign_node_labels(utility: 'restricted-utility', 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') |
| 35 | + |
| 36 | +utils.main_wrapper( |
| 37 | +core_logic: { |
| 38 | + utils.parallel_stage('Build', [ |
| 39 | + custom_steps.compile_unix_lite() |
| 40 | + ]) |
| 41 | + |
| 42 | + utils.parallel_stage('Build Docs', [ |
| 43 | + // Only building a subset of the docs for previewing on staging |
| 44 | + custom_steps.docs_jekyll(), |
| 45 | + custom_steps.docs_python() |
| 46 | + ]) |
| 47 | + |
| 48 | + utils.parallel_stage('Prepare', [ |
| 49 | + custom_steps.docs_prepare_beta() |
| 50 | + ]) |
| 51 | + |
| 52 | + utils.parallel_stage('Publish', [ |
| 53 | + custom_steps.docs_publish_beta() |
| 54 | + ]) |
| 55 | +} |
| 56 | +, |
| 57 | +failure_handler: { |
| 58 | + // Only send email if master or release branches failed |
| 59 | + if (currentBuild.result == "FAILURE" && (env.BRANCH_NAME == "master" || env.BRANCH_NAME.startsWith("v"))) { |
| 60 | + emailext body: 'Build for MXNet branch ${BRANCH_NAME} has broken. Please view the build at ${BUILD_URL}', replyTo: '${EMAIL}', subject: '[BUILD FAILED] Branch ${BRANCH_NAME} build ${BUILD_NUMBER}', to: '${EMAIL}' |
| 61 | + } |
| 62 | +} |
| 63 | +) |
0 commit comments