diff --git a/buildenv/jenkins/JenkinsfileBase b/buildenv/jenkins/JenkinsfileBase index 76fbe926d4..d97144c174 100644 --- a/buildenv/jenkins/JenkinsfileBase +++ b/buildenv/jenkins/JenkinsfileBase @@ -43,10 +43,13 @@ def setupEnv() { TKG_BRANCH = tkg[1] //For Zos, the right repo should be something like: git@github.ibm.com: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/","git@github.com:") OPENJ9_REPO = OPENJ9_REPO.replace("https://github.com/","git@github.com:") } + if (params.USE_GIT_SSH) { + env.JDK_REPO = env.JDK_REPO.replace("https://github.com/","git@github.com:") + } 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 : "" diff --git a/buildenv/jenkins/getDependency b/buildenv/jenkins/getDependency index c0b925e363..3c27b8f702 100644 --- a/buildenv/jenkins/getDependency +++ b/buildenv/jenkins/getDependency @@ -17,12 +17,13 @@ def testBuild() { timeout(time: time_limit, unit: 'HOURS') { try { if( params.BUILD_TYPE == "systemtest" ){ + def repoPrefix = params.USE_GIT_SSH ? "git@github.com:" : "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' diff --git a/buildenv/jenkins/testJobTemplate b/buildenv/jenkins/testJobTemplate index 22e61cd057..7097209c46 100644 --- a/buildenv/jenkins/testJobTemplate +++ b/buildenv/jenkins/testJobTemplate @@ -62,6 +62,7 @@ if (!binding.hasVariable('USER_CREDENTIALS_ID')) USER_CREDENTIALS_ID = "" if (!binding.hasVariable('GENERATE_JOBS')) GENERATE_JOBS = false if (!binding.hasVariable('CLOUD_PROVIDER')) CLOUD_PROVIDER = "" if (!binding.hasVariable('RERUN_ITERATIONS')) RERUN_ITERATIONS = "0" +if (!binding.hasVariable('USE_GIT_SSH')) USE_GIT_SSH = false if (!binding.hasVariable('BUILDS_TO_KEEP')) { BUILDS_TO_KEEP = 10 @@ -438,6 +439,7 @@ ARCH_OS_LIST.each { ARCH_OS -> booleanParam('PERSONAL_BUILD', false, "Is this a personal build?") booleanParam('USE_TESTENV_PROPERTIES', USE_TESTENV_PROPERTIES.toBoolean(), "use properties defined in the testenv.properties") stringParam('RERUN_ITERATIONS', RERUN_ITERATIONS, "Optional. Number of times to repeat execution of failed test target(s).") + booleanParam('USE_GIT_SSH', USE_GIT_SSH.toBoolean(), "Use ssh protocol? True, if clone all repo by ssh.") } cpsScm { scm { diff --git a/compile.sh b/compile.sh index d6737c3e11..c2c4de0983 100755 --- a/compile.sh +++ b/compile.sh @@ -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/|git@github.com:|") + fi export $line done <$testenv_file if [ $JDK_IMPL == "openj9" ] || [ $JDK_IMPL == "ibm" ]; then diff --git a/external/tomcat/test.sh b/external/tomcat/test.sh index 385d09231e..a3b3240d8d 100644 --- a/external/tomcat/test.sh +++ b/external/tomcat/test.sh @@ -16,7 +16,12 @@ 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="git@github.com:" +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 @@ -24,7 +29,7 @@ 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 diff --git a/get.sh b/get.sh index 697dbc5546..cc8b43457e 100755 --- a/get.sh +++ b/get.sh @@ -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/|git@github.com:|") + 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/|git@github.com:|"` + fi executeCmdWithRetry "openj9" "git clone --depth 1 --reference-if-able ${HOME}/openjdk_cache $OPENJ9_BRANCH $OPENJ9_REPO" rt_code=$? diff --git a/perf/bumbleBench/build.xml b/perf/bumbleBench/build.xml index 38de1c4f22..89fc0c4c24 100644 --- a/perf/bumbleBench/build.xml +++ b/perf/bumbleBench/build.xml @@ -22,6 +22,8 @@ + + @@ -29,7 +31,10 @@ - + + + + @@ -37,7 +42,7 @@ - +