Skip to content

Commit

Permalink
adds option to skip logs gathering
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Kononykhin <[email protected]>
  • Loading branch information
andkononykhin committed Jul 23, 2019
1 parent 6a27d98 commit 5828257
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Jenkinsfile.nightly
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
String pkgName = 'indy-node'
String mainModuleName = 'indy_node'
String emailRecipients = params.INDY_NODE_RECIPIENTS ?: env.INDY_NODE_RECIPIENTS ?: ''
Boolean gatherLogs = (params.GATHER_LOGS ?: env.GATHER_LOGS) != 'false'

def localLib
def err
Expand Down Expand Up @@ -61,6 +62,7 @@ try {
]
testVersion = 'v0.8.7'
testVersionByTag = true
delegate.gatherLogs = gatherLogs
}
} catch(Exception _err) {
currentBuild.result = "FAILED"
Expand Down
6 changes: 4 additions & 2 deletions ci/pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ def systemTests(Closure body) {
srcVersion: null,
testSchema: [['.']],
testVersion: null,
testVersionByTag: false
testVersionByTag: false,
gatherLogs: true
],
body, ['pkgVersion'], {}, prefix
)
Expand Down Expand Up @@ -93,6 +94,7 @@ def systemTests(Closure body) {
String testReportFileNamePlain = "system_tests_${testGroup}_report.${config.repoChannel}.txt"
String testTargets = config.testSchema[testGroup].collect{"system/indy-node-tests/$it"}.join(' ')
String buildLogsDir = "_build/logs"
String gatherLogsOpt = config.gatherLogs ? ' --gatherlogs' : ''

try {
stage("[${testGroup}] Run tests") {
Expand All @@ -101,7 +103,7 @@ def systemTests(Closure body) {
set -o pipefail; \
./system/docker/run.sh \
\\"$testTargets\\" \
\\"-l -vv --junit-xml=$testReportFileNameXml --gatherlogs --logsdir=${buildLogsDir}\\" \
\\"-l -vv --junit-xml=$testReportFileNameXml ${gatherLogsOpt} --logsdir=${buildLogsDir}\\" \
\\"$systemTestsNetwork\\" 2>&1 | tee $testReportFileNamePlain;\
"
"""
Expand Down

0 comments on commit 5828257

Please sign in to comment.