Skip to content
Closed
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
75 changes: 39 additions & 36 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ properties([
])

def axes = [
platforms: ['linux', 'windows'],
jdks: [21, 25],
platforms: ['windows'],
jdks: [25],
]

stage('Record build') {
Expand All @@ -31,6 +31,7 @@ stage('Record build') {
*/
// Replace URL encoded characters with '-' because Launchable rejects '%2F' in build name
def launchableName = env.BUILD_TAG.replaceAll('(%[0-9A-Fa-f]{2})+', '-')
sh 'python -m pip --no-cache-dir install launchable=="1.121.2"'
sh "launchable verify && launchable record build --name ${launchableName} --source jenkinsci/jenkins=."
axes.values().combinations {
def (platform, jdk) = it
Expand Down Expand Up @@ -67,7 +68,7 @@ axes.values().combinations {
// see https://github.com/jenkins-infra/documentation/blob/master/ci.adoc#node-labels for information on what node types are available
def agentContainerLabel = 'maven-' + jdk
if (platform == 'windows') {
agentContainerLabel += '-windows'
agentContainerLabel = 'infratest-windows'
}
int retryCount = 0
retry(conditions: [kubernetesAgent(handleNonKubernetes: true), nonresumable()], count: 2) {
Expand Down Expand Up @@ -118,9 +119,11 @@ axes.values().combinations {
withCredentials([string(credentialsId: 'launchable-jenkins-jenkins', variable: 'LAUNCHABLE_TOKEN')]) {
if (isUnix()) {
excludesFile = "${tmpDir}/excludes.txt"
sh 'python -m pip --no-cache-dir install launchable=="1.121.2"'
sh "launchable verify && launchable subset --session ${session} --target ${target} --get-tests-from-previous-sessions --output-exclusion-rules maven >${excludesFile}"
} else {
excludesFile = "${tmpDir}\\excludes.txt"
bat 'python -m pip --no-cache-dir install launchable=="1.121.2"'
bat "launchable verify && launchable subset --session ${session} --target ${target}% --get-tests-from-previous-sessions --output-exclusion-rules maven >${excludesFile}"
}
}
Expand Down Expand Up @@ -216,40 +219,40 @@ axes.values().combinations {
}
}

def athAxes = [
platforms: ['linux'],
jdks: [21],
browsers: ['firefox'],
]
athAxes.values().combinations {
def (platform, jdk, browser) = it
builds["ath-${platform}-jdk${jdk}-${browser}"] = {
retry(conditions: [agent(), nonresumable()], count: 2) {
node('docker-highmem') {
// Just to be safe
deleteDir()
checkout scm
// def athAxes = [
// platforms: ['linux'],
// jdks: [21],
// browsers: ['firefox'],
// ]
// athAxes.values().combinations {
// def (platform, jdk, browser) = it
// builds["ath-${platform}-jdk${jdk}-${browser}"] = {
// retry(conditions: [agent(), nonresumable()], count: 2) {
// node('docker-highmem') {
// // Just to be safe
// deleteDir()
// checkout scm

withChecks(name: 'Tests', includeStage: true) {
infra.withArtifactCachingProxy {
sh "bash ath.sh ${jdk} ${browser}"
}
junit testResults: 'target/ath-reports/TEST-*.xml', testDataPublishers: [[$class: 'AttachmentPublisher']]
}
/*
* Currently disabled, as the fact that this is a manually created subset will confuse Launchable,
* which expects this to be a full build. When we implement subsetting, this can be re-enabled using
* Launchable's subset rather than our own.
*/
/*
withCredentials([string(credentialsId: 'launchable-jenkins-acceptance-test-harness', variable: 'LAUNCHABLE_TOKEN')]) {
sh "launchable verify && launchable record tests --no-build --flavor platform=${platform} --flavor jdk=${jdk} --flavor browser=${browser} maven './target/ath-reports'"
}
*/
}
}
}
}
// withChecks(name: 'Tests', includeStage: true) {
// infra.withArtifactCachingProxy {
// sh "bash ath.sh ${jdk} ${browser}"
// }
// junit testResults: 'target/ath-reports/TEST-*.xml', testDataPublishers: [[$class: 'AttachmentPublisher']]
// }
// /*
// * Currently disabled, as the fact that this is a manually created subset will confuse Launchable,
// * which expects this to be a full build. When we implement subsetting, this can be re-enabled using
// * Launchable's subset rather than our own.
// */
// /*
// withCredentials([string(credentialsId: 'launchable-jenkins-acceptance-test-harness', variable: 'LAUNCHABLE_TOKEN')]) {
// sh "launchable verify && launchable record tests --no-build --flavor platform=${platform} --flavor jdk=${jdk} --flavor browser=${browser} maven './target/ath-reports'"
// }
// */
// }
// }
// }
// }

builds.failFast = failFast
parallel builds
Expand Down