Skip to content

Commit

Permalink
Auto set LIGHT_WEIGHT_CHECKOUT based on ADOPTOPENJDK_REPO
Browse files Browse the repository at this point in the history
Signed-off-by: Lan Xia <[email protected]>
  • Loading branch information
llxia committed Aug 30, 2024
1 parent 6fc63d4 commit 753ba2a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion buildenv/jenkins/aqaTestPipeline.groovy
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!groovy

import groovy.transform.Field

def JDK_VERSIONS = params.JDK_VERSIONS.trim().split("\\s*,\\s*")
def PLATFORMS = params.PLATFORMS.trim().split("\\s*,\\s*")
def TARGETS = params.TARGETS ?: "Grinder"
Expand All @@ -16,11 +18,20 @@ if (params.NUM_MACHINES) {
}
def SDK_RESOURCE = params.SDK_RESOURCE ? params.SDK_RESOURCE : "releases"
def TIME_LIMIT = params.TIME_LIMIT ? params.TIME_LIMIT : 10
def AUTO_AQA_GEN = params.AUTO_AQA_GEN ? params.AUTO_AQA_GEN.toBoolean() : false

AUTO_AQA_GEN = params.AUTO_AQA_GEN ? params.AUTO_AQA_GEN.toBoolean() : false
def TRSS_URL = params.TRSS_URL ? params.TRSS_URL : "https://trss.adoptium.net/"
def TEST_FLAG = (params.TEST_FLAG) ?: ""
def LIGHT_WEIGHT_CHECKOUT = params.LIGHT_WEIGHT_CHECKOUT ?: false

// If personal repo and branch are set, test jobs need to be regenerated (with LIGHT_WEIGHT_CHECKOUT = false)
// to take personal repo and branch.
if (params.ADOPTOPENJDK_REPO && !params.ADOPTOPENJDK_REPO.contains("adoptium/aqa-tests")) {
LIGHT_WEIGHT_CHECKOUT = false
AUTO_AQA_GEN = true
echo "ADOPTOPENJDK_REPO is set to personal repo. Auto-set LIGHT_WEIGHT_CHECKOUT: ${LIGHT_WEIGHT_CHECKOUT} and AUTO_AQA_GEN: ${AUTO_AQA_GEN}"
}

// Use BUILD_USER_ID if set and jdk-JDK_VERSIONS
def DEFAULT_SUFFIX = (env.BUILD_USER_ID) ? "${env.BUILD_USER_ID} - jdk-${params.JDK_VERSIONS}" : "jdk-${params.JDK_VERSIONS}"
def PIPELINE_DISPLAY_NAME = (params.PIPELINE_DISPLAY_NAME) ? "#${currentBuild.number} - ${params.PIPELINE_DISPLAY_NAME}" : "#${currentBuild.number} - ${DEFAULT_SUFFIX}"
Expand Down

0 comments on commit 753ba2a

Please sign in to comment.