-
-
Notifications
You must be signed in to change notification settings - Fork 317
/
Copy pathgetDependency
59 lines (52 loc) · 2.3 KB
/
getDependency
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
#!groovy
LABEL=params.LABEL ? params.LABEL : 'ci.role.test&&hw.arch.x86&&sw.os.linux'
stage('Queue') {
node("$LABEL") {
cleanWs()
testBuild()
}
}
def testBuild() {
def time_limit = 8
if(params.TIME_LIMIT) {
time_limit = params.TIME_LIMIT.toInteger()
}
timeout(time: time_limit, unit: 'HOURS') {
try {
if( params.BUILD_TYPE == "systemtest" ){
sh 'curl -OLJks "https://api.adoptopenjdk.net/v3/binary/latest/8/ga/linux/x64/jdk/hotspot/normal/adoptopenjdk"'
sh 'mkdir ${WORKSPACE}/j2sdk-image'
sh 'tar -xzf OpenJDK8U-jdk_x64_linux_hotspot*.gz -C ${WORKSPACE}/j2sdk-image --strip-components 1'
sh '${WORKSPACE}/j2sdk-image/jre/bin/java -version'
sh 'git clone https://github.com/adoptium/aqa-systemtest'
sh 'git clone https://github.com/adoptium/STF'
sh 'ant -f ./aqa-systemtest/openjdk.build/build.xml -Djava.home=${WORKSPACE}/j2sdk-image/jre -Dprereqs_root=${WORKSPACE}/systemtest_prereqs configure'
sh 'ant -f ./aqa-systemtest/openjdk.test.mauve/build.xml -Djava.home=${WORKSPACE}/j2sdk-image/jre -Dprereqs_root=${WORKSPACE}/systemtest_prereqs configure'
archiveArtifacts '**/systemtest_prereqs/cvsclient/org-netbeans-lib-cvsclient.jar'
archiveArtifacts '**/systemtest_prereqs/mauve/mauve.jar'
archiveArtifacts '**/systemtest_prereqs/junit/junit.jar'
archiveArtifacts '**/systemtest_prereqs/junit/hamcrest-core.jar'
archiveArtifacts '**/systemtest_prereqs/log4j/log4j-api.jar'
archiveArtifacts '**/systemtest_prereqs/log4j/log4j-core.jar'
archiveArtifacts '**/systemtest_prereqs/apache-ant/lib/ant-launcher.jar'
archiveArtifacts '**/systemtest_prereqs/asm/asm.jar'
archiveArtifacts '**/systemtest_prereqs/tools/tools.jar'
} else {
def TKG_OWNER_BRANCH = params.TKG_OWNER_BRANCH ?: "adoptium:master"
def tokens = TKG_OWNER_BRANCH.split(':');
if (tokens.size() == 2) {
def owner = tokens[0];
def branch = tokens[1];
sh "curl -Os https://raw.githubusercontent.com/${owner}/TKG/${branch}/scripts/getDependencies.pl"
sh 'perl ./getDependencies.pl -path . -task default'
archiveArtifacts '*.jar, *.zip, *.txt, *.gz'
} else {
assert false : "TKG_OWNER_BRANCH ${TKG_OWNER_BRANCH} is not expected format. (i.e., TKG_OWNER_BRANCH=adoptium:master)"
}
}
} finally {
cleanWs()
}
}
}
return this