-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathJenkinsfile.rcptt-product-report-test
113 lines (107 loc) · 6.5 KB
/
Jenkinsfile.rcptt-product-report-test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
pipeline {
agent none
options {
buildDiscarder logRotator(numToKeepStr: '10')
throttleJobProperty categories: ['rcptt-jenkins'], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 3, maxConcurrentTotal: 3, paramsToUseForLimit: '', throttleEnabled: true, throttleOption: 'category'
}
parameters {
gitParameter branch: '', branchFilter: '.*', defaultValue: 'develop' , quickFilterEnabled: true, selectedValue: 'NONE', sortMode: 'NONE', tagFilter: '*', type: 'PT_BRANCH_TAG',
description: 'The branch or that that the tests are taken from', name: 'BRANCH_OR_TAG'
string name: 'job_to_copy_from', defaultValue: 'verinice/develop',
description: '''The job that the AUT is copied from<br/>
Please note that slashes in the branch-name must be escaped as %2F, e.g. <code>verinice/feature%2Fvn-0000-make-everything-great</code>.'''
buildSelector name: 'build_to_copy_from',
description: 'The build number of the job that the AUT is copied from'
string(name: 'SERVER_TIMEOUT', defaultValue: '360',
description: 'The startup timeout of the verinice server.')
string(name: 'TEST_OPTIONS', defaultValue: 'testExecTimeout=45000;execTimeout=410000;reportingIncludeIgnoredWaitDetails=true;passedTestDetails=true;runtimeEnableActivityLogs=true;q7ImageCapture=true;jobHangTimeout=900000;contextRunnableTimeout=900000',
description: 'The options of the rcptt testing program.')
}
stages {
stage('Run RCPTT tests') {
agent {
node {
label 'linux-gui-tester'
}
}
steps {
sh 'env'
buildDescription "branch: ${env.GIT_BRANCH}:<br>aut job: ${params.job_to_copy_from}<br>tests: ${params.TEST_LIST}"
//remove old stuff
sh '''
rm -f *.zip
rm -f -r $WORKSPACE/gui-test-runner/test-data/dsm
rm -f -r $WORKSPACE/gui-test-runner/test-data/dsm-mogs
'''
copyArtifacts filter: "**/verinice-*${VERINICE_CLIENT_SELECTOR_OS_COMPONENT}.zip",
fingerprintArtifacts: true, flatten: true,
projectName: params.job_to_copy_from,
selector: buildParameter(params.build_to_copy_from)
//copy and prepare products
//
// datenschutz-iso
copyArtifacts filter: 'build/distributions/datenschutzmodul*.zip',
projectName: 'datenschutzmodul',
fingerprintArtifacts: true, flatten: true,
selector: lastSuccessful()
sh '''
unzip datenschutzmodul-*.zip -d $WORKSPACE/gui-test-runner/test-data/dsm
rm datenschutzmodul-*.zip
'''
// datenschutz-mogs
copyArtifacts filter: 'build/distributions/datenschutzmodul-mogs-*.zip',
projectName: 'eu_ds_gvo_reports-mogs/master',
fingerprintArtifacts: true, flatten: true,
selector: lastSuccessful()
sh '''
unzip datenschutzmodul-*.zip -d $WORKSPACE/gui-test-runner/test-data/dsm-mogs
rm datenschutzmodul-*.zip
'''
wrap([$class: 'Xvfb', additionalOptions: '', assignedLabels: '',
autoDisplayName: true, displayNameOffset: 0, installationName: 'default-Xvfb',
screen: '1200x960x24']) {
withAnt(installation: 'Ant 1.9.0') {
withEnv(["rcptt_runner_HOME=${tool name: 'rcptt_runner-nightly', type: 'com.cloudbees.jenkins.plugins.customtools.CustomTool'}"]) {
sh '''
ant -buildfile gui-test-runner/start-gui-test.xml test-verinice-client-test-custom \
-Drunner-path="${rcptt_runner_HOME}" \
-Dverinice.server.port=883${EXECUTOR_NUMBER} \
-Dtest-list="reports-*-ds.test" \
-Dverinice.timeout=${SERVER_TIMEOUT} \
-Dskip-tags="serverOnlyTest;performance;skipExecution" \
-Dtest-options="${TEST_OPTIONS}" \
-Dverinice.lang=de
'''
}
}
}
dir(tool(name: 'logparser', type: 'com.cloudbees.jenkins.plugins.customtools.CustomTool')){
sh "./logParser -i log4j -d $WORKSPACE/gui-test-runner/result/log -f verinice-client.* -o jenkins -n $WORKSPACE/gui-test-runner/result/log/clientlogparsed.txt"
}
junit testDataPublishers: [[$class: 'StabilityTestDataPublisher']], testResults: 'gui-test-runner/result/results.junit.xml'
perfReport filterRegex: '', sourceDataFiles: 'gui-test-runner/result/results.junit.xml'
recordIssues(tools: [groovyScript(parserId: 'aut-eclipse-log', pattern: 'gui-test-runner/result/log/verinice-aut/.log*')])
recordIssues(tools: [groovyScript(id: 'verince-client-log', name: 'verince-client-log', parserId: 'verinice-log-parser', pattern: 'gui-test-runner/result/log/clientlogparsed.txt')])
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'gui-test-runner/result', reportFiles: 'results.html', reportName: 'Gui Test Report', reportTitles: "${env.job_to_copy_from}"])
}
post {
always {
archiveArtifacts allowEmptyArchive: true, artifacts: 'gui-test-runner/result/**/*.*', excludes: 'build/result/auth/**'
notifyBitbucket stashServerBaseUrl: 'https://git.verinice.org/bb',
credentialsId: 'bitbucket',
commitSha1: '',
considerUnstableAsSuccess: false,
disableInprogressNotification: false,
ignoreUnverifiedSSLPeer: false,
includeBuildNumberInKey: false,
prependParentProjectKey: false,
buildStatus: currentBuild.result,
buildName: currentBuild.fullDisplayName,
projectKey: ''
cleanWs patterns: [[pattern: '*.zip', type: 'INCLUDE']],
notFailBuild: true
}
}
}
}
}