From 6dbec07152661d36d2f7bccf8497766f72f798c1 Mon Sep 17 00:00:00 2001 From: Giulia Naponiello Date: Jan 16 2019 15:35:55 +0000 Subject: Reintroduce the building of the doc This was disabled due to a bug in Pagure. It looks like this might be working now. Let's try to reintroduce it. --- diff --git a/Jenkinsfile b/Jenkinsfile index c8b4096..4bb55c5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -81,6 +81,35 @@ node('fedora-28') { zoomCoverageChart: false ]) } + stage('Build Docs') { + sh 'DEV=true GREENWAVE_CONFIG=$(pwd)/conf/settings.py.example make -C docs html' + archiveArtifacts artifacts: 'docs/_build/html/**' + } + if (scmVars.GIT_BRANCH == 'origin/master') { + stage('Publish Docs') { + sshagent (credentials: ['pagure-greenwave-deploy-key']) { + sh ''' + mkdir -p ~/.ssh/ + touch ~/.ssh/known_hosts + ssh-keygen -R pagure.io + echo 'pagure.io,140.211.169.204 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC198DWs0SQ3DX0ptu+8Wq6wnZMrXUCufN+wdSCtlyhHUeQ3q5B4Hgto1n2FMj752vToCfNTn9mWO7l2rNTrKeBsELpubl2jECHu4LqxkRVihu5UEzejfjiWNDN2jdXbYFY27GW9zymD7Gq3u+T/Mkp4lIcQKRoJaLobBmcVxrLPEEJMKI4AJY31jgxMTnxi7KcR+U5udQrZ3dzCn2BqUdiN5dMgckr4yNPjhl3emJeVJ/uhAJrEsgjzqxAb60smMO5/1By+yF85Wih4TnFtF4LwYYuxgqiNv72Xy4D/MGxCqkO/nH5eRNfcJ+AJFE7727F7Tnbo4xmAjilvRria/+l' >>~/.ssh/known_hosts + rm -rf docs-on-pagure + git clone ssh://git@pagure.io/docs/greenwave.git docs-on-pagure + rm -r docs-on-pagure/* + cp -r docs/_build/html/* docs-on-pagure/ + cd docs-on-pagure + git add -A . + if [[ "$(git diff --cached --numstat | wc -l)" -eq 0 ]] ; then + exit 0 # No changes, nothing to commit + fi + git config user.name "Jenkins Job" + git config user.email "nobody@redhat.com" + git commit -m 'Automatic commit of docs built by Jenkins job ${env.JOB_NAME} #${env.BUILD_NUMBER}' + git push origin master + ''' + } + } + } stage('Build SRPM') { sh './rpmbuild.sh -bs' archiveArtifacts artifacts: 'rpmbuild-output/**'