Skip to content

Commit

Permalink
Update documentation retention (#1386)
Browse files Browse the repository at this point in the history
- Documentation published for pull requests are
  only kept for the newest build.
- Documentation published for master/development
  is purged after being published to site.
  • Loading branch information
fallberg authored Apr 12, 2020
1 parent 6e1a20d commit 97d3867
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .ci/doxygen.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,23 @@ def call(config) {
failedTotalAll: '', healthy: '', includePattern: '', messagesPattern: '',
parserConfigurations: [[parserName: 'Doxygen', pattern: config.repository_root+'doxygen.log']],
unHealthy: '', unstableTotalAll: '0'
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true,
reportDir: config.repository_root+'Documentation/html',
reportFiles: 'index.html', reportName: 'Doxygen HTML', reportTitles: ''])

if (!config.is_pull_request)
{
// Publish docs to API server
if (env.BRANCH_NAME == 'master') {
sh """#!/bin/bash
scp -r ${config.repository_root}Documentation/html docs@direct.openhardware.io:"""
scp -r ${config.repository_root}Documentation/html docs@direct.openhardware.io:
rm -rf ${config.repository_root}Documentation/html"""
} else if (env.BRANCH_NAME == 'development') {
sh """#!/bin/bash
scp -r ${config.repository_root}Documentation/html docs@direct.openhardware.io:beta"""
scp -r ${config.repository_root}Documentation/html docs@direct.openhardware.io:beta
rm -rf ${config.repository_root}Documentation/html"""
}
} else {
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false,
reportDir: config.repository_root+'Documentation/html',
reportFiles: 'index.html', reportName: 'Doxygen HTML', reportTitles: ''])
if (currentBuild.currentResult == 'UNSTABLE') {
config.pr.setBuildStatus(config, 'ERROR', 'Toll gate (Documentation)', 'Warnings found', '${BUILD_URL}warnings16Result/new')
error 'Terminating due to doxygen error'
Expand Down

0 comments on commit 97d3867

Please sign in to comment.