Skip to content

Commit 97d3867

Browse files
authored
Update documentation retention (#1386)
- Documentation published for pull requests are only kept for the newest build. - Documentation published for master/development is purged after being published to site.
1 parent 6e1a20d commit 97d3867

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.ci/doxygen.groovy

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,23 @@ def call(config) {
1010
failedTotalAll: '', healthy: '', includePattern: '', messagesPattern: '',
1111
parserConfigurations: [[parserName: 'Doxygen', pattern: config.repository_root+'doxygen.log']],
1212
unHealthy: '', unstableTotalAll: '0'
13-
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true,
14-
reportDir: config.repository_root+'Documentation/html',
15-
reportFiles: 'index.html', reportName: 'Doxygen HTML', reportTitles: ''])
1613

1714
if (!config.is_pull_request)
1815
{
1916
// Publish docs to API server
2017
if (env.BRANCH_NAME == 'master') {
2118
sh """#!/bin/bash
22-
scp -r ${config.repository_root}Documentation/html docs@direct.openhardware.io:"""
19+
scp -r ${config.repository_root}Documentation/html docs@direct.openhardware.io:
20+
rm -rf ${config.repository_root}Documentation/html"""
2321
} else if (env.BRANCH_NAME == 'development') {
2422
sh """#!/bin/bash
25-
scp -r ${config.repository_root}Documentation/html docs@direct.openhardware.io:beta"""
23+
scp -r ${config.repository_root}Documentation/html docs@direct.openhardware.io:beta
24+
rm -rf ${config.repository_root}Documentation/html"""
2625
}
2726
} else {
27+
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false,
28+
reportDir: config.repository_root+'Documentation/html',
29+
reportFiles: 'index.html', reportName: 'Doxygen HTML', reportTitles: ''])
2830
if (currentBuild.currentResult == 'UNSTABLE') {
2931
config.pr.setBuildStatus(config, 'ERROR', 'Toll gate (Documentation)', 'Warnings found', '${BUILD_URL}warnings16Result/new')
3032
error 'Terminating due to doxygen error'

0 commit comments

Comments
 (0)