removes ansiColor step
This commit is contained in:
98
Jenkinsfile
vendored
98
Jenkinsfile
vendored
@@ -89,64 +89,62 @@ def canaryShouldRun = true
|
|||||||
|
|
||||||
node {
|
node {
|
||||||
timestamps {
|
timestamps {
|
||||||
ansiColor('xterm') {
|
try {
|
||||||
try {
|
stage('Checkout') {
|
||||||
stage('Checkout') {
|
checkout scm
|
||||||
checkout scm
|
}
|
||||||
|
|
||||||
|
stage('Check Canary Divergence') {
|
||||||
|
def pinnedCommit = resolveImageCommit(params.SIMULATOR_IMAGE_PINNED)
|
||||||
|
def latestCommit = resolveImageCommit(params.SIMULATOR_IMAGE_LATEST)
|
||||||
|
|
||||||
|
if (!pinnedCommit) {
|
||||||
|
error "Missing git-commit label on ${params.SIMULATOR_IMAGE_PINNED}"
|
||||||
|
}
|
||||||
|
if (!latestCommit) {
|
||||||
|
error "Missing git-commit label on ${params.SIMULATOR_IMAGE_LATEST}"
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Check Canary Divergence') {
|
canaryShouldRun = (pinnedCommit != latestCommit)
|
||||||
def pinnedCommit = resolveImageCommit(params.SIMULATOR_IMAGE_PINNED)
|
|
||||||
def latestCommit = resolveImageCommit(params.SIMULATOR_IMAGE_LATEST)
|
|
||||||
|
|
||||||
if (!pinnedCommit) {
|
if (canaryShouldRun) {
|
||||||
error "Missing git-commit label on ${params.SIMULATOR_IMAGE_PINNED}"
|
echo "Canary enabled: ${params.SIMULATOR_IMAGE_LATEST} (${latestCommit}) diverges from ${params.SIMULATOR_IMAGE_PINNED} (${pinnedCommit})"
|
||||||
}
|
} else {
|
||||||
if (!latestCommit) {
|
echo "Canary skipped: ${params.SIMULATOR_IMAGE_LATEST} and ${params.SIMULATOR_IMAGE_PINNED} both use git-commit ${pinnedCommit}"
|
||||||
error "Missing git-commit label on ${params.SIMULATOR_IMAGE_LATEST}"
|
|
||||||
}
|
|
||||||
|
|
||||||
canaryShouldRun = (pinnedCommit != latestCommit)
|
|
||||||
|
|
||||||
if (canaryShouldRun) {
|
|
||||||
echo "Canary enabled: ${params.SIMULATOR_IMAGE_LATEST} (${latestCommit}) diverges from ${params.SIMULATOR_IMAGE_PINNED} (${pinnedCommit})"
|
|
||||||
} else {
|
|
||||||
echo "Canary skipped: ${params.SIMULATOR_IMAGE_LATEST} and ${params.SIMULATOR_IMAGE_PINNED} both use git-commit ${pinnedCommit}"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('Stable Regression') {
|
stage('Stable Regression') {
|
||||||
runRegressionLane(params.SIMULATOR_IMAGE_PINNED, params.THREADX_TEST_SIMULATOR, false)
|
runRegressionLane(params.SIMULATOR_IMAGE_PINNED, params.THREADX_TEST_SIMULATOR, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Simulator Canary') {
|
stage('Simulator Canary') {
|
||||||
if (canaryShouldRun) {
|
if (canaryShouldRun) {
|
||||||
runRegressionLane(params.SIMULATOR_IMAGE_LATEST, params.THREADX_TEST_SIMULATOR, true)
|
runRegressionLane(params.SIMULATOR_IMAGE_LATEST, params.THREADX_TEST_SIMULATOR, true)
|
||||||
} else {
|
} else {
|
||||||
echo 'Skipping canary lane because latest and pinned images are identical.'
|
echo 'Skipping canary lane because latest and pinned images are identical.'
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (err) {
|
}
|
||||||
currentBuild.result = 'FAILURE'
|
} catch (err) {
|
||||||
throw err
|
currentBuild.result = 'FAILURE'
|
||||||
} finally {
|
throw err
|
||||||
junit allowEmptyResults: true, testResults: 'build/*/test/*/ctest-results.xml'
|
} finally {
|
||||||
archiveArtifacts artifacts: 'build/*/test/*/*.map,build/*/test/*/*.dis,build/*/test/*/Testing/**', allowEmptyArchive: true
|
junit allowEmptyResults: true, testResults: 'build/*/test/*/ctest-results.xml'
|
||||||
|
archiveArtifacts artifacts: 'build/*/test/*/*.map,build/*/test/*/*.dis,build/*/test/*/Testing/**', allowEmptyArchive: true
|
||||||
|
|
||||||
if (currentBuild.currentResult == 'SUCCESS') {
|
if (currentBuild.currentResult == 'SUCCESS') {
|
||||||
rocketSend ":thumbsup: ThreadX regression run passed, results at ${env.RUN_DISPLAY_URL} "
|
rocketSend ":thumbsup: ThreadX regression run passed, results at ${env.RUN_DISPLAY_URL} "
|
||||||
} else if (currentBuild.currentResult == 'UNSTABLE') {
|
} else if (currentBuild.currentResult == 'UNSTABLE') {
|
||||||
rocketSend ":warning: ThreadX canary regression is unstable on ${params.SIMULATOR_IMAGE_LATEST}, please check ${env.RUN_DISPLAY_URL} "
|
rocketSend ":warning: ThreadX canary regression is unstable on ${params.SIMULATOR_IMAGE_LATEST}, please check ${env.RUN_DISPLAY_URL} "
|
||||||
} else if (currentBuild.currentResult == 'FAILURE') {
|
} else if (currentBuild.currentResult == 'FAILURE') {
|
||||||
archiveArtifacts artifacts: 'failed_seeds_*.txt', followSymlinks: false, onlyIfSuccessful: false
|
archiveArtifacts artifacts: 'failed_seeds_*.txt', followSymlinks: false, onlyIfSuccessful: false
|
||||||
rocketSend ":thumbsdown: ThreadX regression failed, please check ${env.RUN_DISPLAY_URL} "
|
rocketSend ":thumbsdown: ThreadX regression failed, please check ${env.RUN_DISPLAY_URL} "
|
||||||
emailext recipientProviders: [culprits(), requestor()],
|
emailext recipientProviders: [culprits(), requestor()],
|
||||||
subject: "ThreadX Pipeline Failed: ${currentBuild.fullDisplayName}",
|
subject: "ThreadX Pipeline Failed: ${currentBuild.fullDisplayName}",
|
||||||
body: """
|
body: """
|
||||||
<p>Build Status: ${currentBuild.currentResult}</p>
|
<p>Build Status: ${currentBuild.currentResult}</p>
|
||||||
<p> Check logs at <a href='${env.BUILD_URL}console'> Build Console Logs </a> or at <a href='${env.RUN_DISPLAY_URL}'> Overview </a></p>
|
<p> Check logs at <a href='${env.BUILD_URL}console'> Build Console Logs </a> or at <a href='${env.RUN_DISPLAY_URL}'> Overview </a></p>
|
||||||
"""
|
"""
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user