-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve pipeline enablement and making it optional #80
Comments
This sounds reasonable, please feel free to contribute. |
Quick question: Why should I as a Shouldn't this plugin simply be activated on the server-side, and "just work" for any pipelines running, with or without color output? My frame of reference here is all the other hosted CI solutions out there (Travis, CircleCI, etc, etc) that have colouring "enabled by default", I've never seen any ci-specific file in a GitHub project that explicitly enabled colouring, not even just "enable/disable for this project", let alone "enable for this line". I'm sure I'm missing some technical context on why this is ill-adviced/difficult, but I'm looking at it from an end-user perspective. |
@JeanMertz I think this is purely historical. IMO this should be the default and available with the default Jenkins distribution. |
A nice side-effect of this feature-request would be: A DSL, similar to the one of Timestamper, would also enable using the ANSIcolor plugin outside of |
To put a finer point on @JeanMertz comment: Is there either a way to simply turn on AnsiColor with a checkbox in the UI instead of code in Jenkinsfile? We'd want both an Admin way to set that as the default, and a user-way of toggling the checkbox per job. |
I believe #83 closes this, can someone please try? |
My PR allows to use a simpler Pipeline syntax without the need for the build wrapper. But makes the usage not optional depending on whether the plugin is installed or not. In negative case you will always get |
I can confirm, that the new syntax works, even without a surrounding node. |
Should this be closed? |
Now using Jenkins pipelines is becoming the norm instead of the weird-use-case and we do need an improved way to enable the AnsiColorBuildWrapper.
Have a look at the Timestamper plugin which now supports the nice DSL syntax:
To make the usage even better I would like to be able to have some kind of condition: if ansi plugin is present enable it, or continue if not.
With these two small additions we could write much better Jenkins pipelines and we would avoid unpleasant surprises if it happens to have the plugin not installed. Build will continue, which is much better than having it broken because the ansicolor plugin was missing.
PS. Please mind that's possible for the plugin to be broken at some point and that's why is much better not to break continuity and continue to work without the feature. Optionally we could throw a warning message, but what matters is to avoid breakages.
The text was updated successfully, but these errors were encountered: