Getting original file name from within notification plugin

56 views
Skip to first unread message

Fernando Hafner

unread,
Feb 6, 2019, 9:41:17 AM2/6/19
to rundeck-discuss
Need help with the following scenario: 

Job reads a file as an option ( let's name it file.in ) along with some other freeform text intputs to run a ansible playbook.

After the job finishes , i populate my slack template with the execution data, which is mostly based the options.

Options values can be accessed by using ${executionData.context.option.my_option}, but in order to get the original file name i would need something like ${executionData.context.file.my_option.fileName}

I tried 


${executionData.context.file.my_option.fileName}
${executionData.file.my_option.fileName}


But neither of the two options are found.


Any help is greatly appreciated ! 


rac...@rundeck.com

unread,
Feb 6, 2019, 4:37:41 PM2/6/19
to rundeck-discuss
Hi Fernando,

I tested and you can use this:

${file.my_option.fileName}

Try it.

Hope it helps!

Fernando Hafner

unread,
Feb 7, 2019, 6:00:49 AM2/7/19
to rundeck...@googlegroups.com
That doesn't work i'm afraid.

${file.my_option.fileName} will only work if referenced from within rundeck itself. It will not work from within a notification plugin - more specifically , from within a slack message template file ( FTL file ) 

Thanks anyways though ! :)


--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
To post to this group, send email to rundeck...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rundeck-discuss/26a9211b-c8c4-474b-87da-0d86ca74946c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Att.
Fernando Hafner
Reply all
Reply to author
Forward
0 new messages