This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set HEROKU_TOKEN and APP_NAME at Settings -> Pipelines -> Environment variables.
bitbucket-pipelines.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We will use Jest-junit test reporter to integrate jest results with Jenkins.
Installation
npm install-D jest jest-junit
Configuration
Add to package.json:
"scripts":{..."test":"jest"}
Add to Jenkinsfile:
stage('tests'){withEnv(["JEST_JUNIT_OUTPUT=./jest-test-results.xml"]){sh'npm test -- --ci --testResultsProcessor="jest-junit"'}junit'jest-test-results.xml'}