Unexpected behaviour - wrong output value

24 views
Skip to first unread message

Александр Редкин

unread,
Nov 4, 2017, 8:41:03 AM11/4/17
to BioUno Developers

Good day! I'm using Jenkins 2.86 for windows with active choices plugin (the latest version)

I use Jenkins to build and push .net projects to Octopus. In case of multiple projects in solution developers want to have an ability to push only several of this projects. But usually we just use scm polling and push all the projects.
To demonstrate the issue, I've created a simple project (config and page's code included).
The first thing I've used Active Choices Parameter with the following groovy script: return['1:selected','2:selected','3:selected'] .
So, I have 3 checkboxes in the Test parameter
And then I'm trying to get A.C. Parameter's value with the help of powershell plugin version 1.3 (and also good old-fashioned cmd too)
When I trigger the job manually, I have a predictable output: 

[EnvInject] - Loading node environment variables.

Building in workspace C:\CI\Integration test job

[Integration test job] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\Users\jenkins\AppData\Local\Temp\jenkins5384378150141602921.ps1'"

1,2,3

[Integration test job] $ cmd /c call C:\Users\jenkins\AppData\Local\Temp\jenkins1818120628542832358.bat

 

C:\CI\Integration test job>echo 1,2,3 

1,2,3

 

C:\CI\Integration test job>exit 0 

Finished: SUCCESS

But when job is triggered automatically the output is 

[EnvInject] - Loading node environment variables.

Building in workspace C:\CI\Integration test job

[Integration test job] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\Users\jenkins\AppData\Local\Temp\jenkins5066575831946924953.ps1'"

1:selected

[Integration test job] $ cmd /c call C:\Users\jenkins\AppData\Local\Temp\jenkins6906721098540333797.bat

 

C:\CI\Integration test job>echo 1:selected 

1:selected

 

C:\CI\Integration test job>exit 0 

Finished: SUCCESS

 

It's not a big deal to cut ":selected", then parse an output string and create an array with elements 1, 2 and 3. But I would like to get all the elements, not only the first one
I've created a logger according to the instructions https://wiki.jenkins.io/display/JENKINS/Troubleshooting , and there are no any errors there:

ноя 04, 2017 1:58:03 PM FINER org.biouno.unochoice.AbstractUnoChoiceParameter getDefaultParameterValue

 

ENTRY

 

ноя 04, 2017 1:59:03 PM FINER org.biouno.unochoice.AbstractUnoChoiceParameter getDefaultParameterValue

 

ENTRY

 

ноя 04, 2017 2:00:03 PM FINER org.biouno.unochoice.AbstractUnoChoiceParameter getDefaultParameterValue

 

ENTRY

 


Does anybody have any ideas or suggestions?

 

config.xml
PageCode.txt

Bruno P. Kinoshita

unread,
Nov 5, 2017, 12:44:36 AM11/5/17
to biouno-d...@googlegroups.com
Hello,

I believe this is a known issue. See Known Limitations at https://wiki.jenkins.io/display/JENKINS/Active+Choices+Plugin.


Feel free to chime in and post your example there. Haven't had time at current job, and spare time being used in other projects, so I'm taking a bit longer to work on a solution for it. But in case you have time to submit a pull request, I'd be happy to review & merge it.

Cheers
Bruno



From: Александр Редкин <power...@gmail.com>
To: BioUno Developers <biouno-d...@googlegroups.com>
Sent: Sunday, 5 November 2017 1:41 AM
Subject: Unexpected behaviour - wrong output value

--
You received this message because you are subscribed to the Google Groups "BioUno Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biouno-develop...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Александр Редкин

unread,
Nov 6, 2017, 2:52:16 AM11/6/17
to biouno-d...@googlegroups.com
Thank you for the fast response! 
OK!  I'll try to fix this behavior. I'll inform you when I'll have any results
Best regards,  Alex 

5 нояб. 2017 г. 7:44 ДП пользователь "'Bruno P. Kinoshita' via BioUno Developers" <biouno-d...@googlegroups.com> написал:
Hello,

I believe this is a known issue. See Known Limitations at https://wiki.jenkins.io/display/JENKINS/Active+Choices+Plugin.


Feel free to chime in and post your example there. Haven't had time at current job, and spare time being used in other projects, so I'm taking a bit longer to work on a solution for it. But in case you have time to submit a pull request, I'd be happy to review & merge it.

Cheers
Bruno



From: Александр Редкин <power...@gmail.com>
To: BioUno Developers <biouno-developers@googlegroups.com>
To unsubscribe from this group and stop receiving emails from it, send an email to biouno-developers+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to a topic in the Google Groups "BioUno Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/biouno-developers/Si9B5Z24yWs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to biouno-developers+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages