Hello Les Mikesell, I could give a try with the Workflow plugin, although I'm able to use it right now because our SCM is not yet compliant. Thanks for pointing me out to those libs!
Rafael On Mon, Mar 9, 2015 at 9:04 PM, Les Mikesell <[email protected]> wrote: > On Mon, Mar 9, 2015 at 9:23 AM, Rafael Ribeiro Rezende > <[email protected]> wrote: > > 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]</email> > > </developer> > > <developer> > > <id>dev2</id> > > <name>Developer 2</name> > > <email>[email protected]</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 > > > > Parsing xml always turns out to be non-trivial, so you'll probably > want access to groovy's XmlParser or XmlSlurper functionality - which > you could get from the groovy plugin. However, I think only the > 'system' groovy step can add to the build job environment, and since > it runs on the master I don't see how to make it read files in the > slave's workspace. > > -- > Les Mikesell > [email protected] > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Jenkins Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/jenkinsci-users/r9j5R63M3R4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/CAOAgVpwoty9EysqRK0dn%2B5OJd04a5APrTp8JCrrk13SWGQhFxA%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- Rafael R Rezende -- 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/CAHF%3D1fxovoTNwEqkJKs5nsPu8NJ-LdzWZwtt8LzCBZe%3DqAQEUQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
