-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Enable comments in .jenkins file #26
Comments
Hi @szalapski , To read the Thanks for your help |
An easy way would be to allow a comment anywhere with:
comment: "Any comment we want",
...that would then be ignored by the plugin.
…On Sun, Sep 16, 2018 at 5:26 PM Alessandro Fragnani < ***@***.***> wrote:
Hi @szalapski <https://github.com/szalapski> ,
To read the .jenkins file, and easily convert it to an Object, I use
JSON.parse(), which does not support comments. If you know a stable
library that support that, I'll be glad to use it.
Thanks for your help
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACmOsYWRuptebqOkBl0D0VrsCIM4_0qGks5ubs_7gaJpZM4WORjH>
.
|
Do you mean as a "new attribute", like: {
"url": "http://127.0.0.1:8080/job/myproject",
"username": "jenkins_user",
"password": "jenkins_password_or_token",
"comment": "Any comment we want"
} That would be easy to do, but I don't think this would be effective. I'm thinking that move from # Any comment we want
url: http://127.0.0.1:8080/job/myproject
username: jenkins_user
password: jenkins_password_or_token I don't remember why I decided to use JSON in the first place. Probably because the simplicity of What do you think? |
One reason to use JSON would be that the settings file in VSCode uses JSON. I don't see the files conflicting in any way, but I do think it's a benefit to have the same markup language used across the board. |
Yep, probably that, but once JSON does not support comments, we are out of luck. I'll do that, I just have to decide if I support a file named Thank you |
At the very least, unrecognized keys/values shouldn't break things. This
would enable unofficial comments to be added as additional keys/values.
…On Wed, Oct 31, 2018 at 11:45 AM Alessandro Fragnani < ***@***.***> wrote:
Yep, probably that, but once JSON does not support comments, we are out of
luck.
I'll do that, I just have to decide if I support a file named .jenkins as
JSON *or* YAML, or add support to another file named .jenkins.yml for the
YAML format. I'll see 😄
Thank you
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACmOscMc_awPtfAd43tEtvXX_rNcdbzEks5uqdOfgaJpZM4WORjH>
.
|
You can also use comment-json library. It is able to parse commented JSON files. It also has a fairly small dependency tree. |
Could you somehow enable us to add comments in the .jenkins file? Currently, it seems like any invalid characters cause Jenkins Status to fail silently.
The text was updated successfully, but these errors were encountered: