diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index 7d91d4e5d121..be4d742dd0c4 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -1832,12 +1832,12 @@ build_docs() { popd } -build_docs_small() { +build_docs_beta() { pushd docs/_build tar -xzf jekyll-artifacts.tgz api_folder='html/api' mkdir -p $api_folder/python/docs && tar -xzf python-artifacts.tgz --directory $api_folder/python/docs - # The folder to be published is now in /docs/_build/html + GZIP=-9 tar -zcvf beta_website.tgz -C html . popd } diff --git a/ci/jenkins/Jenkins_steps.groovy b/ci/jenkins/Jenkins_steps.groovy index 30db32252e66..7473a08071bf 100644 --- a/ci/jenkins/Jenkins_steps.groovy +++ b/ci/jenkins/Jenkins_steps.groovy @@ -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_" @@ -1604,6 +1604,27 @@ def docs_prepare() { } +def docs_prepare_beta() { + return ['Prepare for publication to the staging 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_beta', 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) { @@ -1639,6 +1660,24 @@ def docs_publish() { } +// This is for the beta website +def docs_publish_beta() { + return ['Publish the beta website to staging': { + 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': { diff --git a/ci/jenkins/Jenkinsfile_website b/ci/jenkins/Jenkinsfile_website_beta similarity index 67% rename from ci/jenkins/Jenkinsfile_website rename to ci/jenkins/Jenkinsfile_website_beta index f6c853046b1c..9220052e9f0f 100644 --- a/ci/jenkins/Jenkinsfile_website +++ b/ci/jenkins/Jenkinsfile_website_beta @@ -19,24 +19,39 @@ // // 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('utility') { +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: 'utility', linux_cpu: 'mxnetlinux-cpu') + +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('Placeholder', [ - // Do nothing + 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: {