How to implement complex update

(Sion Williams) #1

I’m currently working with a 3rd party that supplies us with a .war file. I need to update the war with our web service endpoints, but these change between environments.

Here’s my attempt, but this doesnt seem to work:


(Benjamin Muschko) #2

Maybe it would actually be easier if you package the correct file based on the set environment when the WAR file is built initially.

(Sion Williams) #3

Twice in one day! I messaged you on the Manning forum about your slide deck.

I had thought about doing that, but how would that work in the pipeline you wrote about?(not that my suggestion works either).

At the moment I am getting around this using an explode, substitute then zip. It’s not pretty, but it works.

(Benjamin Muschko) #4

Usually you will want to avoid rebuilding the deliverable artifact in the context of Continuous Delivery. Most people use infrastructure tools like Puppet and Chef to take care of versioning and syncing configuration files with the environment. Alternatively, you could package the configuration files for all environments and then use the right file dynamically as runtime (e.g. by setting a system property or environment variable).