Skip to content

Commit

Permalink
Merge pull request #17 from ThomasDelteil/new_website_pipeline_2_synt…
Browse files Browse the repository at this point in the history
…ax_error

fix syntax error
  • Loading branch information
ThomasDelteil authored Sep 17, 2019
2 parents 260b6da + 905eeb2 commit 0f76335
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions ci/jenkins/Jenkins_steps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,18 @@ def compile_unix_lite() {
}]
}


def should_pack_website() {
if (env.BRANCH_NAME) {
if (env.BRANCH_NAME == "master" || env.BRANCH_NAME.startsWith("new_")) {
retun true
}
} else {
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 All @@ -1420,7 +1432,7 @@ def docs_python() {
timeout(time: max_time, unit: 'MINUTES') {
utils.unpack_and_init('libmxnet', mx_lib, false)
utils.docker_run('ubuntu_cpu_python', 'build_python_docs', false)
if (env.BRANCH_NAME == "master" || env.BRANCH_NAME.startsWith("new_")) {
if (should_pack_website()) {
utils.pack_lib('python-artifacts', 'docs/_build/python-artifacts.tgz', false)
}
}
Expand All @@ -1438,7 +1450,7 @@ def docs_c() {
timeout(time: max_time, unit: 'MINUTES') {
utils.unpack_and_init('libmxnet', 'lib/libmxnet.so', false)
utils.docker_run('ubuntu_cpu_c', 'build_c_docs', false)
if (env.BRANCH_NAME == "master" || env.BRANCH_NAME.startsWith("new_")) {
if (should_pack_website()) {
utils.pack_lib('c-artifacts', 'docs/_build/c-artifacts.tgz', false)
}
}
Expand All @@ -1456,7 +1468,7 @@ def docs_julia() {
timeout(time: max_time, unit: 'MINUTES') {
utils.unpack_and_init('libmxnet', mx_lib, false)
utils.docker_run('ubuntu_cpu_julia', 'build_julia_docs', false)
if (env.BRANCH_NAME == "master" || env.BRANCH_NAME.startsWith("new_")) {
if (should_pack_website()) {
utils.pack_lib('julia-artifacts', 'docs/_build/julia-artifacts.tgz', false)
}
}
Expand All @@ -1474,7 +1486,7 @@ def docs_r() {
timeout(time: max_time, unit: 'MINUTES') {
utils.unpack_and_init('libmxnet', mx_lib, false)
utils.docker_run('ubuntu_cpu_r', 'build_r_docs', false)
if (env.BRANCH_NAME == "master" || env.BRANCH_NAME.startsWith("new_")) {
if (should_pack_website()) {
utils.pack_lib('r-artifacts', 'docs/_build/r-artifacts.tgz', false)
}
}
Expand All @@ -1493,7 +1505,7 @@ def docs_scala() {
timeout(time: max_time, unit: 'MINUTES') {
utils.unpack_and_init('libmxnet', mx_lib, false)
utils.docker_run('ubuntu_cpu_scala', 'build_scala_docs', false)
if (env.BRANCH_NAME == "master" || env.BRANCH_NAME.startsWith("new_")) {
if (should_pack_website()) {
utils.pack_lib('scala-artifacts', 'docs/_build/scala-artifacts.tgz', false)
}
}
Expand All @@ -1512,7 +1524,7 @@ def docs_java() {
timeout(time: max_time, unit: 'MINUTES') {
utils.unpack_and_init('libmxnet', mx_lib, false)
utils.docker_run('ubuntu_cpu_scala', 'build_java_docs', false)
if (env.BRANCH_NAME == "master" || env.BRANCH_NAME.startsWith("new_")) {
if (should_pack_website()) {
utils.pack_lib('java-artifacts', 'docs/_build/java-artifacts.tgz', false)
}
}
Expand All @@ -1531,7 +1543,7 @@ def docs_clojure() {
timeout(time: max_time, unit: 'MINUTES') {
utils.unpack_and_init('libmxnet', mx_lib, false)
utils.docker_run('ubuntu_cpu_scala', 'build_clojure_docs', false)
if (env.BRANCH_NAME == "master" || env.BRANCH_NAME.startsWith("new_")) {
if (should_pack_website()) {
utils.pack_lib('clojure-artifacts', 'docs/_build/clojure-artifacts.tgz', false)
}
}
Expand All @@ -1549,7 +1561,7 @@ def docs_jekyll() {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.docker_run('ubuntu_cpu_jekyll', 'build_jekyll_docs', false)
if (env.BRANCH_NAME == "master" || env.BRANCH_NAME.startsWith("new_")) {
if (should_pack_website()) {
utils.pack_lib('jekyll-artifacts', 'docs/_build/jekyll-artifacts.tgz', false)
}
}
Expand Down Expand Up @@ -1614,8 +1626,12 @@ def docs_publish() {
// If used stashed files, you can retrieve them here
//unstash 'full_website'
//sh 'tar -xzf docs/_build/full_website.tgz --directory .'
// This jenkins job pulls artifacts from website-build-master
build 'restricted-website-publish-master'
try {
build 'restricted-website-publish-master'
}
catch (Exception e) {
println(e.getMessage())
}
}
}
}
Expand Down

0 comments on commit 0f76335

Please sign in to comment.