1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing,
12 // software distributed under the License is distributed on an
13 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 // KIND, either express or implied. See the License for the
15 // specific language governing permissions and limitations
19 string(name: 'tests', description: 'space separated list of tests to run. e.g. ' +
20 'TestLogRollingNoCluster TestMetricRegistryImpl TestConstraints')
21 string(name: 'node', defaultValue: 'Hadoop',
22 description: 'the node label that should be used to run the test.')
23 string(name: 'repeat_count', defaultValue: '100',
24 description: 'number of iterations to run looking for a failure.')
25 string(name: 'fork_count', defaultValue: '0.5C', description: '''
26 Given to surefire to set the number of parallel forks for a given test attempt (i.e. one
27 maven invocation that has all of the specified tests. The default tries to use half of the
28 available cores on the system.
30 For more information see
31 <a href="http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#forkCount">
32 the surefire docs on the forkCount parameter</a>
37 label "${params.node}"
41 timeout (time: 6, unit: 'HOURS')
45 // where we check out to across stages
46 BASEDIR = "${env.WORKSPACE}/component"
47 OUTPUT_RELATIVE = 'output'
48 OUTPUTDIR = "${env.WORKSPACE}/output"
49 BRANCH_SPECIFIC_DOCKERFILE = "${env.BASEDIR}/dev-support/docker/Dockerfile"
55 // this needs to be set to the jdk that ought to be used to build releases on the branch
56 // the Jenkinsfile is stored in.
61 echo "Setting up directories"
62 rm -rf "${env.OUTPUTDIR}" && mkdir "${env.OUTPUTDIR}"
63 rm -rf ".m2-repo" && mkdir ".m2-repo"
64 mkdir "${env.OUTPUTDIR}/machine"
67 "${env.BASEDIR}/dev-support/gather_machine_environment.sh" \
68 "${OUTPUT_RELATIVE}/machine"
72 ./dev-support/adhoc_run_tests/adhoc_run_tests.sh \
73 --force-timeout 1800 \
74 --maven-local-repo ".m2-repo" \
75 --log-output "${OUTPUTDIR}" \
76 --surefire-fork-count "${fork_count}" \
77 --repeat "${repeat_count}" \
84 archiveArtifacts artifacts: 'output/*'
85 archiveArtifacts artifacts: 'output/**/*'
88 archiveArtifacts artifacts: 'component/**/target/surefire-reports/*'