Skip to content

Commit

Permalink
Merge pull request #1 from xalbertoisorna/feature/improving_docs
Browse files Browse the repository at this point in the history
removing docker from docs build
  • Loading branch information
xalbertoisorna authored Jun 14, 2024
2 parents 77d238c + 42c801f commit 2291766
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ def runningOn(machine) {
println machine
}

def checkSkipLink() {
def skip_linkcheck = ""
if (env.GH_LABEL_ALL.contains("skip_linkcheck")) {
println "skip_linkcheck set, skipping link check..."
skip_linkcheck = "clean html pdf"
}
return skip_linkcheck
}

def buildDocs(String zipFileName) {
withVenv {
sh 'pip install git+ssh://[email protected]/xmos/[email protected]'
sh "xmosdoc ${checkSkipLink()}"
zip zipFile: zipFileName, archive: true, dir: "doc/_build"
}
}

getApproval()

pipeline {
Expand Down Expand Up @@ -38,24 +55,15 @@ pipeline {
stage('Build and Docs') {
parallel {
stage('Build Docs') {
agent { label "docker" }
environment { XMOSDOC_VERSION = "v5.0" }
agent { label "documentation" }
steps {
script {
def skip_linkcheck = ""
if (env.GH_LABEL_ALL.contains("skip_linkcheck")) {
println "skip_linkcheck set, skipping link check..."
skip_linkcheck = "clean html pdf"
}
runningOn(env.NODE_NAME)
dir('fwk_rtos'){
checkout scm
sh 'git submodule update --init --recursive --depth 1'
sh "docker pull ghcr.io/xmos/xmosdoc:$XMOSDOC_VERSION"
sh """docker run -u "\$(id -u):\$(id -g)" \
--rm \
-v ${WORKSPACE}:/build \
ghcr.io/xmos/xmosdoc:$XMOSDOC_VERSION -v $skip_linkcheck"""
archiveArtifacts artifacts: "doc/_build/**", allowEmptyArchive: true
} // script
withTools(params.TOOLS_VERSION) {
buildDocs("fwk_rtos_docs.zip")
} // withTools
} // dir
} // steps
post {
cleanup {
Expand Down

0 comments on commit 2291766

Please sign in to comment.