diff --git a/dist/index.js b/dist/index.js index d4afed8..204446e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -436,7 +436,18 @@ function getAqaTestsRepo(aqatestsRepo, version, buildList) { if (buildList === 'openjdk' && version != '') { process.chdir('openjdk'); // Shallow clone the adoptium JDK version - quietly - if there is a reference repo obtain objects from there - destination is openjdk-jdk - yield exec.exec(`git clone --depth 1 -q --reference-if-able ${process.env.GITHUB_WORKSPACE}/openjdk_cache https://github.com/adoptium/jdk${version}.git openjdk-jdk`); + try { + let openJDKGitCmd = "git clone --depth 1 -q --reference-if-able ${process.env.GITHUB_WORKSPACE}/openjdk_cache https://github.com/adoptium/jdk${version}"; + const exitCode = yield exec.exec(`git ls-remote -h https://github.com/adoptium/jdk${version}u.git`); + if (exitCode == 0) { + openJDKGitCmd += 'u'; + } + openJDKGitCmd += '.git openjdk-jdk'; + yield exec.exec(`${openJDKGitCmd}`); + } + catch (err) { + console.error("Git clone openjdk error", err); + } process.chdir('../'); } } diff --git a/src/runaqa.ts b/src/runaqa.ts index 8560bd3..6634522 100644 --- a/src/runaqa.ts +++ b/src/runaqa.ts @@ -294,7 +294,17 @@ async function getAqaTestsRepo(aqatestsRepo: string, version: string, buildList: if (buildList === 'openjdk' && version != '') { process.chdir('openjdk') // Shallow clone the adoptium JDK version - quietly - if there is a reference repo obtain objects from there - destination is openjdk-jdk - await exec.exec(`git clone --depth 1 -q --reference-if-able ${process.env.GITHUB_WORKSPACE}/openjdk_cache https://github.com/adoptium/jdk${version}.git openjdk-jdk`) + try { + let openJDKGitCmd = "git clone --depth 1 -q --reference-if-able ${process.env.GITHUB_WORKSPACE}/openjdk_cache https://github.com/adoptium/jdk${version}" + const exitCode = await exec.exec(`git ls-remote -h https://github.com/adoptium/jdk${version}u.git`) + if (exitCode == 0) { + openJDKGitCmd += 'u' + } + openJDKGitCmd += '.git openjdk-jdk' + await exec.exec(`${openJDKGitCmd}`) + } catch (err) { + console.error("Git clone openjdk error", err) + } process.chdir('../') } }