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

Commit

Permalink
add a pipeline that publishes to staging beta site
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmarkham committed Oct 9, 2019
1 parent eb70cdc commit 359c7fc
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 2 deletions.
43 changes: 41 additions & 2 deletions ci/jenkins/Jenkins_steps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1416,11 +1416,11 @@ def should_pack_website() {
return true
}
} else {
return true
return true
}
return false
}

// Each of the docs_{lang} functions will build the docs...
// Stashing is only needed for master for website publishing or for testing "new_"

Expand Down Expand Up @@ -1604,6 +1604,27 @@ def docs_prepare() {
}


def docs_prepare_beta() {
return ['Prepare for publication of the full website': {
node(NODE_LINUX_CPU) {
ws('workspace/docs') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()

unstash 'jekyll-artifacts'
unstash 'python-artifacts'

utils.docker_run('ubuntu_cpu_jekyll', 'build_docs', false)

// archive so the publish pipeline can access the artifact
archiveArtifacts 'docs/_build/beta_website.tgz'
}
}
}
}]
}


def docs_archive() {
return ['Archive the full website': {
node(NODE_LINUX_CPU) {
Expand Down Expand Up @@ -1639,6 +1660,24 @@ def docs_publish() {
}


// This is for the beta website
def docs_publish_beta() {
return ['Publish the full website': {
node(NODE_LINUX_CPU) {
ws('workspace/docs') {
timeout(time: max_time, unit: 'MINUTES') {
try {
build 'restricted-website-publish-master-beta'
}
catch (Exception e) {
println(e.getMessage())
}
}
}
}
}]
}


def misc_asan_cpu() {
return ['CPU ASAN': {
Expand Down
63 changes: 63 additions & 0 deletions ci/jenkins/Jenkinsfile_website_beta
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// -*- mode: groovy -*-

// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
// Jenkins pipeline
// See documents at https://jenkins.io/doc/book/pipeline/jenkinsfile/
// This pipeline will publish to https://mxnet-beta.staged.apache.org/

// timeout in minutes
max_time = 180

node('restricted-utility') {
// Loading the utilities requires a node context unfortunately
checkout scm
utils = load('ci/Jenkinsfile_utils.groovy')
custom_steps = load('ci/jenkins/Jenkins_steps.groovy')
}

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')

utils.main_wrapper(
core_logic: {
utils.parallel_stage('Build', [
custom_steps.compile_unix_lite()
])

utils.parallel_stage('Build Docs', [
// Only building a subset of the docs for previewing on staging
custom_steps.docs_jekyll(),
custom_steps.docs_python()
])

utils.parallel_stage('Prepare', [
custom_steps.docs_prepare_beta()
])

utils.parallel_stage('Publish', [
custom_steps.docs_publish_beta()
])
}
,
failure_handler: {
// Only send email if master or release branches failed
if (currentBuild.result == "FAILURE" && (env.BRANCH_NAME == "master" || env.BRANCH_NAME.startsWith("v"))) {
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}'
}
}
)

0 comments on commit 359c7fc

Please sign in to comment.