4

Allure commandline 2.6.0; Jenkins ver. 2.89.3;

I am using the following script (no any other post-build settings in job settings):

stage('Generate reports') {
    allure([includeProperties: false,
        reportBuildPolicy: 'ALWAYS',
        results          : [[path: allureResultsPath]]])
    archive 'catalina.log'
}

This gives me the report, but also the following archive, attached to each run: enter image description here

Is it required for Trend, history or something? I'd like to turn it off as it is not used by me and only spends the disk's space.

Is it possible to turn it off using the pipeline script?

Bohdan Nesteruk
  • 794
  • 17
  • 42
  • I guess you'd like to store the report into workspace and cleanup it when next build started? – Dmitry Baev May 21 '18 at 16:05
  • @DmitryBaev no, actually. As far as I can see, there is an allure report folder in the workspace: allure-report where the report actually is. But also there is an allure-report.zip artifact, which is created right after the report is generated ( https://github.com/jenkinsci/allure-plugin/blob/master/src/main/java/ru/yandex/qatools/allure/jenkins/AllureReportPublisher.java#L299). Is it really required for report displaying? I'd like not to keep this archive but still to keep the report in allure-report folder. – Bohdan Nesteruk May 22 '18 at 08:33
  • Jenkins plugin serves the report directly from artefact, so you can clean the workspace and keep the reports. Also if you have lots of reports (free space problem) you can implement Jenkins Artifact manager thats stores artifacts somewhere (an example to S3). – Dmitry Baev May 22 '18 at 11:19
  • In general people need to remove old reports (keep last N reports, or remove reports older than X days). At the moment there is no ready to use solution, so it's up to you. Can run cleanup task by cron at Jenkins instance or implement plugin that will handle it for you – Dmitry Baev May 22 '18 at 11:24

2 Answers2

1

Okay, I looked at the plugin's code and as far as I can see, there is no way to turn off archiving the report. Because it is called right after the report is generated, without any conditions (see saveAllureArtifact at 306 and it's call at 299): https://github.com/jenkinsci/allure-plugin/blob/master/src/main/java/ru/yandex/qatools/allure/jenkins/AllureReportPublisher.java#L299

Bohdan Nesteruk
  • 794
  • 17
  • 42
0

In allure plugin you can add attribute disabled

disabled (optional) Type: boolean

So add disabled: true to your configuration:

allure(disabled: true, ...
Ori Marko
  • 56,308
  • 23
  • 131
  • 233
  • Okay, will try. I saw this, but it looks like disabling the all report generating (all plugin's steps), not only report archiving. Is there any page where each of possible command described? Would really appreciate the link to it – Bohdan Nesteruk May 21 '18 at 09:40
  • @BohdanN You can also set reportBuildPolicy as UNSTABLE or UNSUCCESSFUL – Ori Marko May 21 '18 at 11:08
  • So, disabled: true turns off report generating at all, but I need the report, just without it's .zip version. And in this project there are always failed tests due to more than 1000 e2e test cases, so builds are always unstable. Still looking for the solution to turn off archiving only – Bohdan Nesteruk May 21 '18 at 11:15