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

Commit 359c7fc

Browse files
committed
add a pipeline that publishes to staging beta site
1 parent eb70cdc commit 359c7fc

File tree

2 files changed

+104
-2
lines changed

2 files changed

+104
-2
lines changed

ci/jenkins/Jenkins_steps.groovy

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,11 +1416,11 @@ def should_pack_website() {
14161416
return true
14171417
}
14181418
} else {
1419-
return true
1419+
return true
14201420
}
14211421
return false
14221422
}
1423-
1423+
14241424
// Each of the docs_{lang} functions will build the docs...
14251425
// Stashing is only needed for master for website publishing or for testing "new_"
14261426

@@ -1604,6 +1604,27 @@ def docs_prepare() {
16041604
}
16051605

16061606

1607+
def docs_prepare_beta() {
1608+
return ['Prepare for publication of the full website': {
1609+
node(NODE_LINUX_CPU) {
1610+
ws('workspace/docs') {
1611+
timeout(time: max_time, unit: 'MINUTES') {
1612+
utils.init_git()
1613+
1614+
unstash 'jekyll-artifacts'
1615+
unstash 'python-artifacts'
1616+
1617+
utils.docker_run('ubuntu_cpu_jekyll', 'build_docs', false)
1618+
1619+
// archive so the publish pipeline can access the artifact
1620+
archiveArtifacts 'docs/_build/beta_website.tgz'
1621+
}
1622+
}
1623+
}
1624+
}]
1625+
}
1626+
1627+
16071628
def docs_archive() {
16081629
return ['Archive the full website': {
16091630
node(NODE_LINUX_CPU) {
@@ -1639,6 +1660,24 @@ def docs_publish() {
16391660
}
16401661

16411662

1663+
// This is for the beta website
1664+
def docs_publish_beta() {
1665+
return ['Publish the full website': {
1666+
node(NODE_LINUX_CPU) {
1667+
ws('workspace/docs') {
1668+
timeout(time: max_time, unit: 'MINUTES') {
1669+
try {
1670+
build 'restricted-website-publish-master-beta'
1671+
}
1672+
catch (Exception e) {
1673+
println(e.getMessage())
1674+
}
1675+
}
1676+
}
1677+
}
1678+
}]
1679+
}
1680+
16421681

16431682
def misc_asan_cpu() {
16441683
return ['CPU ASAN': {
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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

Comments
 (0)