Wrong Boolean Conditioned Token

29 views
Skip to first unread message

Ana MB

unread,
Sep 5, 2017, 7:08:25 AM9/5/17
to Jenkins Users
Hi guys!

I don't know how to put a conditioned token to evaluate if a file exists with the Conditional Step Plugin in Jenkins:

This returns the following console output:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 54.479 s
[INFO] Finished at: 2017-09-05T12:57:09+02:00
[INFO] Final Memory: 16M/56M
[INFO] ------------------------------------------------------------------------
Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Unrecognized macro 'test_resultados_miniprueba' in '$test_resultados_miniprueba'], action = [Don't run]
Finished: SUCCESS

What is the error in the condition token?


Thanks so much for your time!!!!

Ana MB

unread,
Sep 5, 2017, 7:16:46 AM9/5/17
to Jenkins Users
I've tried too with "Files Match" Condition and it does the same (nothing):


It returns:


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 58.216 s
[INFO] Finished at: 2017-09-05T13:13:38+02:00
[INFO] Final Memory: 17M/56M
[INFO] ------------------------------------------------------------------------
Files match condition: Matched [0] files
Run condition [Files match] preventing perform for step [Execute shell]
Finished: SUCCESS

What is happening? The file exists in my workspace....

Thanks so much!!!

Victor Martinez

unread,
Sep 5, 2017, 7:27:12 AM9/5/17
to Jenkins Users
Can you confirm whether it does exist under the folder "Workspace"? If you add a shell script step before the conditional step which runs "ls -l" what's the output?

Cheers

Slide

unread,
Sep 5, 2017, 9:44:00 AM9/5/17
to Jenkins Users
I think when using File Matches, you need to specify an ant-style file pattern like you were trying before. Try putting this in the box (verbatim):

Includes "**/test_resultados_miniprueba.csv"

If you click on the help icon (question mark) next to the fields, they can give you valuable information on how to use that field.



On Tue, Sep 5, 2017 at 4:27 AM Victor Martinez <victormar...@gmail.com> wrote:
Can you confirm whether it does exist under the folder "Workspace"? If you add a shell script step before the conditional step which runs "ls -l" what's the output?

Cheers

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6e64b6b6-eabd-4704-9f07-2c0747334864%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ana MB

unread,
Sep 6, 2017, 3:03:54 AM9/6/17
to Jenkins Users
Yesssssss!!!! Perfect!! Thanks so much!!! It works!
Reply all
Reply to author
Forward
0 new messages