Testing markdown

This commit is contained in:
andrew clark
2025-10-22 12:23:23 -06:00
parent 65b1f154d4
commit cb80ee84df

4
qetest/Jenkinsfile vendored
View File

@@ -71,7 +71,7 @@ pipeline {
script {
def buildStatus = currentBuild.result ?: 'SUCCESS'
def statusEmoji = buildStatus == 'SUCCESS' ? '⚠️' : '❌'
def subjectPrefix = buildStatus == 'SUCCESS' ? '**Warning - Issues Detected**' : '**Build Failed**'
def subjectPrefix = buildStatus == 'SUCCESS' ? 'Warning - Issues Detected' : 'Build Failed'
// Get the build log.
def buildLog = sh(script: 'wget -q --no-check-certificate -O - ' + BUILD_URL + 'consoleText', returnStdout: true)
// Check for patterns in the log
@@ -92,7 +92,7 @@ pipeline {
sh '''
curl -X POST "${WEBHOOK_URL}" \
-H 'Content-Type: application/json' \
-d '{"text": "''' + statusEmoji + " " + subjectPrefix + '''\\n\\n**''' + (buildStatus == 'SUCCESS' ? 'Potential issue detected' : 'Build failure detected') + ''':**\\n\\n**Build failure detected:** ''' + patternMap.description + '''\\n\\n**Log context:**\\n```\\n''' + patternMap.context.replace("'", "\\'") + '''\\n```\\n\\n**Job:** ''' + env.JOB_NAME + '''\\n\\n**Branch:** ''' + (env.BRANCH_NAME ?: env.GIT_BRANCH ?: 'Unknown') + '''\\n\\n**Build:** #''' + env.BUILD_NUMBER + '''\\n\\n**URL:** ''' + env.BUILD_URL + '''"}'
-d '{"text": "''' + statusEmoji + ' **' + subjectPrefix + '''**\\n\\n**''' + (buildStatus == 'SUCCESS' ? 'Potential issue detected' : 'Build failure detected') + ''':**\\n\\n**Build failure detected:** ''' + patternMap.description + '''\\n\\n**Log context:**\\n```\\n''' + patternMap.context.replace("'", "\\'") + '''\\n```\\n\\n**Job:** ''' + env.JOB_NAME + '''\\n\\n**Branch:** ''' + (env.BRANCH_NAME ?: env.GIT_BRANCH ?: 'Unknown') + '''\\n\\n**Build:** #''' + env.BUILD_NUMBER + '''\\n\\n**URL:** ''' + env.BUILD_URL + '''"}'
'''
}
}