简体   繁体   中英

generate all web.config transformations at the same time to different files

We have an ASP.NET MVC project setup as a Jenkins build project where the directory contents generated by running a publish profile are saved into an Artifactory build. That one Artifactory build is supposed to be good for any environment (at the moment we have to exclude web.config from this build given this requirement).

If we had all of the web.config transformations available in the Artifactory build at the same time-- each under its own file-- then we could have the Jenkins deployment project copy the appropriate file over web.config on the destination server.

Can this be done? Is there a better way to do this?

Being an expert on Artifactory, but not on asp.net, I am not sure what web-config is, but assuming it's a text file, you have number of options to transform it in Artifactory:

  1. Filtered resources . You can treat any text file in Artifactory as a FreeMarker template, that get populated on a download request.
  2. User plugin . You can manipulate any file in any way you like it with a simple Groovy script, both on upload of the file or on download. I am pretty sure that's the way to go :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM