Skip to content

Commit 74840db

Browse files
committed
refine copyArtifacts logic
- donwload the 3rd party jars based on BUILD_LIST Signed-off-by: Lan Xia <[email protected]>
1 parent 4a1eca1 commit 74840db

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

buildenv/jenkins/JenkinsfileBase

+19-14
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ def setupParallelEnv() {
189189

190190
try {
191191
//get pre-staged jars from test.getDependency build
192-
timeout(time: 2, unit: 'HOURS') {
193-
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
192+
// Only json-simple.jar is needed for compiling TKG
193+
timeout(time: 10, unit: 'MINUTES') {
194+
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", filter: "json-simple.jar", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
194195
}
195196
} catch (Exception e) {
196197
echo 'Exception: ' + e.toString()
@@ -624,29 +625,33 @@ def buildTest() {
624625

625626
try {
626627
//get pre-staged jars from test.getDependency build before test compilation
627-
timeout(time: 2, unit: 'HOURS') {
628-
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
628+
timeout(time: 10, unit: 'MINUTES') {
629+
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", filter: "json-simple.jar", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
629630
}
630-
} catch (Exception e) {
631-
echo 'Exception: ' + e.toString()
632-
echo 'Cannot run copyArtifacts from test.getDependency. Skipping copyArtifacts...'
633-
}
634-
635-
try {
636-
if (env.BUILD_LIST.startsWith('system')) {
631+
if (env.BUILD_LIST.contains('functional')) {
632+
timeout(time: 30, unit: 'MINUTES') {
633+
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", excludes: "json-simple.jar, jtreg*.*", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
634+
}
635+
}
636+
if (env.BUILD_LIST.contains('openjdk')) {
637+
timeout(time: 30, unit: 'MINUTES') {
638+
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", filter: "jtreg*.*,openj9jtregtimeouthandler.*", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
639+
}
640+
}
641+
if (env.BUILD_LIST.contains('system')) {
637642
//get pre-staged test jars from systemtest.getDependency build before system test compilation
638-
timeout(time: 2, unit: 'HOURS') {
643+
timeout(time: 30, unit: 'MINUTES') {
639644
copyArtifacts fingerprintArtifacts: true, projectName: "systemtest.getDependency", selector: lastSuccessful(), target: 'aqa-tests'
640645
}
641646
}
642647
} catch (Exception e) {
643648
echo 'Exception: ' + e.toString()
644-
echo 'Cannot run copyArtifacts from systemtest.getDependency. Skipping copyArtifacts...'
649+
echo 'Cannot run copyArtifacts from test.getDependency/systemtest.getDependency. Skipping copyArtifacts...'
645650
}
646651

647652
if (BUILD_LIST.contains("external")){
648653
try {
649-
timeout(time: 2, unit: 'HOURS') {
654+
timeout(time: 30, unit: 'MINUTES') {
650655
copyArtifacts fingerprintArtifacts: true, projectName: "UploadFileOnJenkins", selector: specific("2"), target: 'aqa-tests/external/criu/'
651656
copyArtifacts fingerprintArtifacts: true, projectName: "UploadFileOnJenkins", selector: specific("3"), target: 'aqa-tests/external/criu/'
652657
}

0 commit comments

Comments
 (0)