I am building a pipeline and am running jest test's and wanted to create as jira/clickup ticket for the test's faild what's the best way to get this done
What i wanted to do is to capture the output of the jest test's and create a ticket in jira/clickup.
Below is the pipeline
- npm install
- npm test
the package.json is as below
"description": "Node app with Jest test's",
"test": "jest --verbose --runInBand --forceExit",
"start": "node server"
Hey @Nataraj ,
Thank you for reaching out to Atlassian Community!
I noticed you have opened an internal support ticket with us about this same question, and it seems it was already resolved.
In this case, I will be sharing the solution of the ticket here :
We suggest using the jira-create-issue pipe insidean after-script section. Inside the after-script, you can check for the latest exit code using the variable 'BITBUCKET_EXIT_CODE'. If the exit code differs from 0, you can trigger the pipe.
- After-script documentation: https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/#after-script.
Thank you, @Nataraj .