-
-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support clone all repo by ssh protocol in testJob (#4228)
- Loading branch information
1 parent
c070735
commit a65325c
Showing
7 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,10 +43,13 @@ def setupEnv() { | |
TKG_BRANCH = tkg[1] | ||
//For Zos, the right repo should be something like: [email protected]:runtimes/openj9-openjdk-jdk**-zos.git and for now there is only jdk11 | ||
env.JDK_REPO = params.JDK_REPO ? params.JDK_REPO : "" | ||
if (env.SPEC.startsWith('zos')) { | ||
if (env.SPEC.startsWith('zos') || params.USE_GIT_SSH) { | ||
ADOPTOPENJDK_REPO = ADOPTOPENJDK_REPO.replace("https://github.com/","[email protected]:") | ||
OPENJ9_REPO = OPENJ9_REPO.replace("https://github.com/","[email protected]:") | ||
} | ||
if (params.USE_GIT_SSH) { | ||
env.JDK_REPO = env.JDK_REPO.replace("https://github.com/","[email protected]:") | ||
} | ||
OPENJ9_BRANCH = params.OPENJ9_BRANCH ? params.OPENJ9_BRANCH : "master" | ||
} | ||
|
||
|
@@ -77,6 +80,7 @@ def setupEnv() { | |
env.EXTERNAL_TEST_CMD=params.EXTERNAL_TEST_CMD ? params.EXTERNAL_TEST_CMD : "mvn clean install" | ||
env.DYNAMIC_COMPILE=params.DYNAMIC_COMPILE ? params.DYNAMIC_COMPILE : false | ||
env.USE_JRE=params.USE_JRE ? params.USE_JRE : false | ||
env.USE_GIT_SSH = params.USE_GIT_SSH ? params.USE_GIT_SSH : false | ||
env.RERUN_LINK = "" | ||
env.FAILED_TEST_TARGET = "" | ||
env.DOCKER_REGISTRY_URL = params.DOCKER_REGISTRY_URL ? params.DOCKER_REGISTRY_URL : "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,12 +17,13 @@ def testBuild() { | |
timeout(time: time_limit, unit: 'HOURS') { | ||
try { | ||
if( params.BUILD_TYPE == "systemtest" ){ | ||
def repoPrefix = params.USE_GIT_SSH ? "[email protected]:" : "https://github.com/" | ||
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 "git clone ${repoPrefix}adoptium/aqa-systemtest" | ||
sh "git clone ${repoPrefix}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' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,9 @@ if [ $USE_TESTENV_PROPERTIES == true ]; then | |
testenv_file="./testenv/testenv_arm32.properties" | ||
fi | ||
while read line; do | ||
if [[ "$USE_GIT_SSH" = "true" ]]; then | ||
line=$(echo "$line" | sed "s|https://github.com/|[email protected]:|") | ||
fi | ||
export $line | ||
done <$testenv_file | ||
if [ $JDK_IMPL == "openj9" ] || [ $JDK_IMPL == "ibm" ]; then | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,15 +16,20 @@ source $(dirname "$0")/test_base_functions.sh | |
#Set up Java to be used by the tomcat test | ||
echo_setup | ||
|
||
git clone -q -b 1.6.x --single-branch https://github.com/apache/apr.git $TEST_HOME/tmp/apr | ||
if [[ "$USE_GIT_SSH" = "true" ]]; then | ||
repo_prefix="[email protected]:" | ||
else | ||
repo_prefix="https://github.com/" | ||
fi | ||
git clone -q -b 1.6.x --single-branch ${repo_prefix}apache/apr.git $TEST_HOME/tmp/apr | ||
cd $TEST_HOME/tmp/apr | ||
./buildconf | ||
./configure --prefix=$TEST_HOME/tmp/apr-build | ||
make | ||
make install | ||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TEST_HOME/tmp/apr-build/lib" | ||
|
||
git clone -q https://github.com/apache/tomcat-native.git $TEST_HOME/tmp/tomcat-native | ||
git clone -q ${repo_prefix}apache/tomcat-native.git $TEST_HOME/tmp/tomcat-native | ||
cd $TEST_HOME/tmp/tomcat-native/native | ||
sh buildconf --with-apr=$TEST_HOME/tmp/apr | ||
./configure --with-apr=$TEST_HOME/tmp/apr --with-java-home=$JAVA_HOME --with-ssl=yes --prefix=$TEST_HOME/tmp/tomcat-native-build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -431,8 +431,11 @@ getTestKitGen() | |
echo "get testKitGen..." | ||
cd $TESTDIR | ||
if [ "$TKG_REPO" = "" ]; then | ||
TKG_REPO="https://github.com/adoptium/TKG.git" | ||
TKG_REPO="https://github.com/adoptium/TKG.git" | ||
fi | ||
if [ "$USE_GIT_SSH" = "true" ];then | ||
TKG_REPO=$(echo "${TKG_REPO}" | sed "s|https://github.com/|[email protected]:|") | ||
fi | ||
|
||
executeCmdWithRetry "TKG" "git clone -q $TKG_REPO" | ||
rt_code=$? | ||
|
@@ -502,6 +505,10 @@ getFunctionalTestMaterial() | |
then | ||
OPENJ9_BRANCH="-b $OPENJ9_BRANCH" | ||
fi | ||
if [ "$USE_GIT_SSH" = "true" ] | ||
then | ||
OPENJ9_REPO=`echo $OPENJ9_REPO | sed "s|https://github.com/|[email protected]:|"` | ||
fi | ||
|
||
executeCmdWithRetry "openj9" "git clone --depth 1 --reference-if-able ${HOME}/openjdk_cache $OPENJ9_BRANCH $OPENJ9_REPO" | ||
rt_code=$? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters