Skip to content

Commit

Permalink
Feature/doxygen pipeline (hyperledger-iroha#1594)
Browse files Browse the repository at this point in the history
* Doxygen docs

Signed-off-by: Alexey R <[email protected]>
  • Loading branch information
Stayer authored and kamilsa committed Jul 30, 2018
1 parent 433fc8a commit 742d211
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 15 deletions.
19 changes: 14 additions & 5 deletions .jenkinsci/doxygen.groovy
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
#!/usr/bin/env groovy

def doDoxygen() {

sh """
doxygen Doxyfile
#rsync docs/doxygen
"""
if (env.GIT_LOCAL_BRANCH in ["master","develop"] || env.CHANGE_BRANCH_LOCAL == 'develop') {
def branch = env.CHANGE_BRANCH_LOCAL == 'develop' ? env.CHANGE_BRANCH_LOCAL : env.GIT_LOCAL_BRANCH
sh "doxygen Doxyfile"
sshagent(['jenkins-artifact']) {
sh "ssh-agent"
sh """
rsync \
-e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
-rzcv --delete \
docs/doxygen/html/* \
[email protected]:/var/nexus-efs/doxygen/${branch}/
"""
}
}
}

return this
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ PROJECT_BRIEF = "Iroha - A simple, decentralized ledger http://iroha.te
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.

PROJECT_LOGO = ./docs/
PROJECT_LOGO = ./docs/image_assets/iroha_logo_doxygen.png

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
Expand Down
25 changes: 17 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ properties([parameters([
choice(choices: '26\n25\n24\n23\n22\n21\n20\n19\n18\n17\n16\n15\n14', description: 'Android Bindings ABI Version', name: 'ABABIVersion'),
choice(choices: 'Release\nDebug', description: 'Android bindings build type', name: 'ABBuildType'),
choice(choices: 'arm64-v8a\narmeabi-v7a\narmeabi\nx86_64\nx86', description: 'Android bindings platform', name: 'ABPlatform'),
booleanParam(defaultValue: false, description: 'Build docs', name: 'Doxygen'),
booleanParam(defaultValue: true, description: 'Build docs', name: 'Doxygen'),
string(defaultValue: '4', description: 'How much parallelism should we exploit. "4" is optimal for machines with modest amount of memory and at least 4 cores', name: 'PARALLELISM')])])


Expand Down Expand Up @@ -371,23 +371,32 @@ pipeline {
stage('Build docs') {
when {
beforeAgent true
allOf {
expression { return params.Doxygen }
expression { GIT_LOCAL_BRANCH ==~ /(master|develop)/ }
}
expression { return params.Doxygen }
}
// build docs on any vacant node. Prefer `x86_64` over
// others as nodes are more powerful
agent { label 'x86_64 || arm' }
agent { label 'x86_64' }
steps {
script {
def doxygen = load ".jenkinsci/doxygen.groovy"
docker.image("${env.DOCKER_IMAGE}").inside {
def scmVars = checkout scm
def dPullOrBuild = load ".jenkinsci/docker-pull-or-build.groovy"
def platform = sh(script: 'uname -m', returnStdout: true).trim()
def iC = dPullOrBuild.dockerPullOrUpdate(
"$platform-develop-build",
"${env.GIT_RAW_BASE_URL}/${env.GIT_COMMIT}/docker/develop/Dockerfile",
"${env.GIT_RAW_BASE_URL}/${env.GIT_PREVIOUS_COMMIT}/docker/develop/Dockerfile",
"${env.GIT_RAW_BASE_URL}/develop/docker/develop/Dockerfile",
['PARALLELISM': params.PARALLELISM])
iC.inside() {
doxygen.doDoxygen()
}
}
}
post {
cleanup {
cleanWs()
}
}
}
stage('Build bindings') {
when {
Expand Down
2 changes: 1 addition & 1 deletion docker/develop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN set -e; \
libpcre3-dev autoconf bison \
# other
wget curl file gdb ccache \
gcovr cppcheck doxygen graphviz graphviz-dev unzip zip; \
gcovr cppcheck doxygen rsync graphviz graphviz-dev unzip zip; \
apt-get -y clean

# install cmake 3.10.2
Expand Down
Binary file added docs/image_assets/iroha_logo_doxygen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 742d211

Please sign in to comment.