Open mippos opened 3 years ago
I also see this issue - appears to be at random. Not a gamechanger as you can just run again. Love the plug in!!
The extension doesn't work at all for me if I create it in Visual Studio 2022. It creates it as a UTF-8 BOM file.
I get the following error:
Errors encountered validating Jenkinsfile:
WorkflowScript: 1: unexpected char: 0xBB @ line 1, column 2.
pipeline {
^
Easy fix though. In Visual Studio, click File -> Save As and remove the asterisk on the end of the file name and click the little dropdown triangle on the save button and choose to save with encoding. Choose Unicode(UTF-8 unsigned...).
Using jenkins 2.363 Plugin version v1.2.0 The plugin concept is really good. In my case, the error occurs most of the time (90%) and subsequent validations always fail. I am happy to try a debug version of the plugin to help debug the issue.
WorkflowScript: 1494: unexpected token: , @ line 1494, column 11. , env.TEST_CHANGELIST_NUMBER = convertP4LabelToCl(env.TEST_CHANGELIST_NUMBER) ^
if (env.BRANCH_BASELINE_LABEL.isNumber() == false) {
env.BRANCH_BASELINE_LABEL = convertP4LabelToCl(env.BRANCH_BASELINE_LABEL)
}
if (g_isCompare == true && env.TEST_CHANGELIST_NUMBER.isNumber() == false) {
env.TEST_CHANGELIST_NUMBER = convertP4LabelToCl(env.TEST_CHANGELIST_NUMBER) // line 1494
}
Errors encountered validating Jenkinsfile: WorkflowScript: 2815: unexpected token: AGENT_LABE @ line 2815, column 1. AGENT_LABE,L="" ^
// This is set according to input parameter MPD_ENVIRO AGENT_LABEL="" // line 2815
The extension doesn't work at all for me if I create it in Visual Studio 2022. It creates it as a UTF-8 BOM file.
I get the following error:
Errors encountered validating Jenkinsfile: WorkflowScript: 1: unexpected char: 0xBB @ line 1, column 2. pipeline { ^
Easy fix though. In Visual Studio, click File -> Save As and remove the asterisk on the end of the file name and click the little dropdown triangle on the save button and choose to save with encoding. Choose Unicode(UTF-8 unsigned...).
Yes, the file save as UTF-signeed, that's wrong, thank you!
I see the same issue with Linux x64 6.10 (Fedora) VSCode 1.94.2 Jenkins Pipelne Linter Connector v1.2.0
I have made sure that my file is UTF-8 but I still get the same error. A funny thing though is that if I comment out the offending line of code, it will pass. But if I remove the commented out line, another similar error pops up on the next line.
I have looked at hexdump to ensure there were no hidden non-printable chars in there anywhere. And if I just use curl to POST the Jenkinsfile to my linter, it always succeeds.
Thanks for the excellent plugin! I am using the plugin pretty much daily.
There is one issue that I am seeing frequently. I don't know is this caused by the plugin or does this come from Jenkins side.
Problem is that when validating, there comes some extra comma to the file sometimes. The extra character is always a comma. When I rerun validation again for the same Jenkinsfile, it passes.
Example error:
I would say this problem comes roughly every 10th time. The problem has been coming longer with multiple Jenkisfiles and character location is always random. It has been at least with ~3 Jenkins versions. Jenkins server is located on same network with ~1ms latency.
Any idea what can cause this extra comma issue?