0

Wondering if it's possible to set up a PR builder using a Jenkinsfile that emits multiple 'test results'.

My scenario in my head:
1. Build my source code
2. Run unit tests

If either step fails, I'd ideally like to have two separate status labels in Github so that the team can easily tell what failed.

Is it possible to have a single Jenkinsfile emit multiple statuses as part of a single 'Pull Request Builder'?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
cdm
  • 719
  • 2
  • 10
  • 22
  • Fair point, updated my question. – cdm Mar 14 '18 at 13:14
  • so you want Jenkins to push a tag (labels aren't a thing in GIT) to GIT if the unit tests build or not? – Liam Mar 14 '18 at 14:17
  • In a word, yes, it is possible. You can do [if statements, etc. in Groovy](https://stackoverflow.com/questions/43587964/jenkins-pipeline-if-else-not-working) so write some logic and send the relevant GIT commands – Liam Mar 14 '18 at 14:18

0 Answers0