AFAIK there's no plugins for such purpose.

The best way to do it in Jenkins w/o plugins would be...

   1. Convert XML file to *.properties using XSLT conversion
   2. Inject environment variables using EnvInject plugin
   
I think a dedicated plugin (or EnvInject extension) would find some users.

Best regards,
Oleg Nenashev


понедельник, 9 марта 2015 г., 17:23:43 UTC+3 пользователь Rafael Ribeiro 
Rezende написал:
>
> Is there any plugin to parse XML and extract selected fields into 
> Environment Variables?
>
> If not, would it make sense to implement something like this for the 
> community?
> For instance, one would provide the XML file with the content:
>
> <project>
>     <developers>
>         <developer>
>             <id>dev1</id>
>             <name>Developer 1</name>
>             <email>[email protected] <javascript:></email>
>         </developer>
>         <developer>
>             <id>dev2</id>
>             <name>Developer 2</name>
>             <email>[email protected] <javascript:></email>
>         </developer>
>     </developers>
>     <organization>
>         <name>Company</name>
>     </organization>
> </project>
>
>
> Then, there would be an additional field where one could make the 
> following assignment:
> DEV_USER = ${project.developers[1].id}
> ORGANIZATION = ${project.organization.name}
>
>
> The following environment variables would be created:
> DEV_USER = dev1
> ORGANIZATION = Company
>
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/564ad7ba-f2c0-41f7-81b5-5cbdaac2bcc9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to