Compare commits

..

23 Commits

Author SHA1 Message Date
bucky d4db64f404 Merge pull request 'cucumber-jenkins' (#20) from cucumber-jenkins into master
Reviewed-on: #20
2023-10-10 17:22:55 -07:00
Adam Townsend 05858078d1 added unstable scenario 2023-10-10 17:20:25 -07:00
Adam Townsend f75f0378bf separate out success and failure tasks 2023-10-10 17:16:24 -07:00
Adam Townsend c3d2fb32e2 added icon for message 2023-10-10 17:11:05 -07:00
Adam Townsend 1fe30fc7e7 removed jenkins cucumber section, use the html formatter instead
also added more info to the success message
2023-10-10 17:05:33 -07:00
Adam Townsend 43cc151138 moved stuff around a little more 2023-10-10 14:50:01 -07:00
Adam Townsend 1fee4f276d maybe put both files in the same report 2023-10-10 14:47:09 -07:00
Adam Townsend 0b17f36fde added more test results, just exploring 2023-10-10 14:43:11 -07:00
Adam Townsend aca92fdae1 cleaned up message a bit for success 2023-10-10 14:32:54 -07:00
Adam Townsend c7bf62062a wrap it 2023-10-10 14:28:41 -07:00
Adam Townsend b853ca6fe4 trying to make the message cleaner, and print the env to take a look at other options 2023-10-10 14:25:59 -07:00
Adam Townsend d5919fc82a got it working with vars, now try the URLs 2023-10-10 14:23:44 -07:00
Adam Townsend e2395989f4 try normal quotes 2023-10-10 14:22:30 -07:00
Adam Townsend e93868a483 try DB_NAME since the others are failing 2023-10-10 14:19:59 -07:00
Adam Townsend 7f6fc24872 maybe this one will work 2023-10-10 14:17:48 -07:00
Adam Townsend 776ec0d30d trying different env vars 2023-10-10 14:10:50 -07:00
Adam Townsend 6861740d00 bots can't be easily used with incoming webhooks, but let's try some URLs 2023-10-10 14:05:18 -07:00
Adam Townsend 77e72d18e1 use the bot's endpoint 2023-10-10 13:50:48 -07:00
Adam Townsend 1792d94082 extra , syntax error in jenkins file 2023-10-10 13:30:40 -07:00
Adam Townsend 16d17bcadb added icon 2023-10-10 13:27:40 -07:00
Adam Townsend f5d1361d59 swapped text/message 2023-10-10 13:10:19 -07:00
Adam Townsend c4932dd6cc message to mattermost example 2023-10-10 13:02:31 -07:00
Adam Townsend 031a30ed5f send slack message to mattermost for cucumber results 2023-10-10 10:52:14 -07:00
1 changed files with 14 additions and 4 deletions

18
Jenkinsfile vendored
View File

@ -25,7 +25,7 @@ pipeline {
} }
stage('Run tests') { stage('Run tests') {
steps { steps {
sh 'cucumber features --format json --out cucumber.json' sh 'cucumber features --format html --out coverage/cucumber.html'
} }
} }
stage('Report results') { stage('Report results') {
@ -36,11 +36,21 @@ pipeline {
alwaysLinkToLastBuild: false, alwaysLinkToLastBuild: false,
keepAll: true, keepAll: true,
reportDir: 'coverage', reportDir: 'coverage',
reportFiles: 'index.html', reportFiles: 'cucumber.html, index.html',
reportName: 'Test Results', reportName: 'Test Results',
reportTitles: 'Test Coverage']) reportTitles: 'Cucumber Results, Test Coverage'])
cucumber buildStatus: 'UNCHANGED', customCssFiles: '', customJsFiles: '', failedFeaturesNumber: -1, failedScenariosNumber: -1, failedStepsNumber: -1, fileIncludePattern: '**/cucumber.json', pendingStepsNumber: -1, skippedStepsNumber: -1, sortingMethod: 'ALPHABETICAL', undefinedStepsNumber: -1
} }
} }
} }
post {
success {
mattermostSend channel: 'git-messages', color: 'good', message: "[${JOB_NAME}](${JOB_URL}) [#${BUILD_NUMBER}](${BUILD_URL}) ([Gitea](${GIT_URL}))", text: 'Build Finished Successfully'
}
unstable {
mattermostSend channel: 'git-messages', color: 'warning', message: "[${JOB_NAME}](${JOB_URL}) [#${BUILD_NUMBER}](${BUILD_URL}) ([Gitea](${GIT_URL}))", text: "Build Unstable"
}
failure {
mattermostSend channel: 'git-messages', color: 'danger', message: "[${JOB_NAME}](${JOB_URL}) [#${BUILD_NUMBER}](${BUILD_URL}) ([Gitea](${GIT_URL}))", text: "Build Failed"
}
}
} }