Skip to content

Commit 75ae92e

Browse files
llxiapshipton
authored andcommitted
refine copyArtifacts logic (#4863)
- donwload the 3rd party jars based on BUILD_LIST Signed-off-by: Lan Xia <[email protected]>
1 parent b10e2e3 commit 75ae92e

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

buildenv/jenkins/JenkinsfileBase

+25-15
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ def setupParallelEnv() {
188188
}
189189

190190
try {
191-
//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'
191+
// Only json-simple.jar is needed for compiling TKG
192+
timeout(time: 15, unit: 'MINUTES') {
193+
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", filter: "json-simple.jar", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
194194
}
195195
} catch (Exception e) {
196196
echo 'Exception: ' + e.toString()
@@ -624,29 +624,39 @@ def buildTest() {
624624

625625
try {
626626
//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'
627+
timeout(time: 15, unit: 'MINUTES') {
628+
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", filter: "json-simple.jar", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
629629
}
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')) {
630+
if (env.BUILD_LIST.contains('functional')) {
631+
timeout(time: 60, unit: 'MINUTES') {
632+
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", excludes: "json-simple.jar, jtreg*.*, openj9jtregtimeouthandler.*", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
633+
}
634+
// jtreg is needed in dev.functional and extended.functional (for ssl-tests and CryptoTest)
635+
if (params.TARGET.contains('dev.functional') || params.TARGET.contains('extended.functional')) {
636+
timeout(time: 60, unit: 'MINUTES') {
637+
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", filter: "jtreg*.*,openj9jtregtimeouthandler.*", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
638+
}
639+
}
640+
}
641+
if (env.BUILD_LIST.contains('openjdk')) {
642+
timeout(time: 60, unit: 'MINUTES') {
643+
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", filter: "jtreg*.*,openj9jtregtimeouthandler.*", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
644+
}
645+
}
646+
if (env.BUILD_LIST.contains('system')) {
637647
//get pre-staged test jars from systemtest.getDependency build before system test compilation
638-
timeout(time: 2, unit: 'HOURS') {
648+
timeout(time: 60, unit: 'MINUTES') {
639649
copyArtifacts fingerprintArtifacts: true, projectName: "systemtest.getDependency", selector: lastSuccessful(), target: 'aqa-tests'
640650
}
641651
}
642652
} catch (Exception e) {
643653
echo 'Exception: ' + e.toString()
644-
echo 'Cannot run copyArtifacts from systemtest.getDependency. Skipping copyArtifacts...'
654+
echo 'Cannot run copyArtifacts from test.getDependency/systemtest.getDependency. Skipping copyArtifacts...'
645655
}
646656

647657
if (BUILD_LIST.contains("external")){
648658
try {
649-
timeout(time: 2, unit: 'HOURS') {
659+
timeout(time: 60, unit: 'MINUTES') {
650660
copyArtifacts fingerprintArtifacts: true, projectName: "UploadFileOnJenkins", selector: specific("2"), target: 'aqa-tests/external/criu/'
651661
copyArtifacts fingerprintArtifacts: true, projectName: "UploadFileOnJenkins", selector: specific("3"), target: 'aqa-tests/external/criu/'
652662
}

0 commit comments

Comments
 (0)