Skip to content
This repository has been archived by the owner on Nov 17, 2018. It is now read-only.

Confusing 'unstable' parameter #37

Closed
HLXEasy opened this issue Sep 26, 2018 · 5 comments
Closed

Confusing 'unstable' parameter #37

HLXEasy opened this issue Sep 26, 2018 · 5 comments

Comments

@HLXEasy
Copy link

HLXEasy commented Sep 26, 2018

Hi,

haven't tested explicitly right now but following the docu, this is very confusing:

unstable
    True makes the left-hand side of the embed green (Only when successful: true).

If a build is unstable (unstable == true), it must not be green but yellow!

@HLXEasy
Copy link
Author

HLXEasy commented Sep 26, 2018

OK, tested it to be sure and it seems to be just a c&p error on the documentation. Settings unstable to true makes the notification bar yellow. :-)

@KocproZ
Copy link
Owner

KocproZ commented Sep 26, 2018

I wanted to make this something like status: "UNSTABLE", but that would break compatibility and force people to edit their Jenkinsfiles, so I kept successful and added unstable boolean.
So for this to work i added following rules:
success: false equals to build status FAILURE, unstable is ommited
success: true, unstable: true equals to build status UNSTABLE,
success: true, unstable: false equals to build status SUCCESS

Now I see it might be confusing to use and I am open to suggestions.
(Would something like optional value status: "UNSTABLE/SUCCESS/FAILURE/ABORTED?" be better?)

@lf-jeremy
Copy link

lf-jeremy commented Sep 27, 2018

An enum of named status values like UNSTABLE|SUCCESS|FAILURE|ABORTED is much more explicit (and more flexible) than a boolean success with a modifier flag. Besides the addition of ABORTED, It also adds the possibility for a PAUSED value.

@KocproZ
Copy link
Owner

KocproZ commented Oct 1, 2018

OK, If someone wants to test this here is a version of the plugin with result enum that takes 4 values: SUCCESS|UNSTABLE|FAILURE|ABORTED (successful and unstable still work, but result overwrites them). I can add different values, but I don't know it they are needed.

@HLXEasy
Copy link
Author

HLXEasy commented Nov 1, 2018

Works like a charm! Time for a new release. 💯

@KocproZ KocproZ closed this as completed Nov 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants