Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v1.0.3-release) Support custom config json file (#5535) #5537

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions buildenv/jenkins/aqaTestPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,21 @@ fail = false
JDK_VERSIONS.each { JDK_VERSION ->
if (params.PLATFORMS == "release") {
def configJson = []
node("worker || (ci.role.test&&hw.arch.x86&&sw.os.linux)") {
checkout scm
dir (env.WORKSPACE) {
def filePath = "./aqa-tests/buildenv/jenkins/config/${params.VARIANT}/"
filePath = filePath + "default.json"
if (fileExists(filePath + "jdk${JDK_VERSION}.json")) {
filePath = filePath + "jdk${JDK_VERSION}.json"
if (params.CONFIG_JSON) {
echo "Read JSON from CONFIG_JSON parameter..."
configJson = readJSON text: "${params.CONFIG_JSON}"
} else {
node("worker || (ci.role.test&&hw.arch.x86&&sw.os.linux)") {
checkout scm
dir (env.WORKSPACE) {
def filePath = "./aqa-tests/buildenv/jenkins/config/${params.VARIANT}/"
filePath = filePath + "default.json"
if (fileExists(filePath + "jdk${JDK_VERSION}.json")) {
filePath = filePath + "jdk${JDK_VERSION}.json"
}
echo "Read JSON from file ${filePath}..."
configJson = readJSON(file: filePath)
}
configJson = readJSON(file: filePath)
}
}

Expand Down Expand Up @@ -77,6 +83,7 @@ if (fail) {
}

def generateJobs(jobJdkVersion, jobTestFlag, jobPlatforms, jobTargets) {
echo "jobJdkVersion: ${jobJdkVersion}, jobTestFlag: ${jobTestFlag}, jobPlatforms: ${jobPlatforms}, jobTargets: ${jobTargets}"
if (jobTestFlag == "NONE") {
jobTestFlag = ""
}
Expand Down Expand Up @@ -190,7 +197,7 @@ def generateJobs(jobJdkVersion, jobTestFlag, jobPlatforms, jobTargets) {
}
echo "AUTO_AQA_GEN: ${AUTO_AQA_GEN}"
// Grinder job has special settings and should be regenerated specifically, not via aqaTestPipeline
if (AUTO_AQA_GEN && !TEST_JOB_NAME.contains("Grinder")) {
if (AUTO_AQA_GEN.toBoolean() && !TEST_JOB_NAME.contains("Grinder")) {
String[] targetTokens = TARGET.split("\\.")
def level = targetTokens[0];
def group = targetTokens[1];
Expand Down