I'm building a web application project that in my view behaves differently in specific environments. I have dev, int, uat, prod environments. DEV is a local environment for developer and 'int' is the integration environment that gets deployed on a remote machine on every commit and runs automated test cases communicating to real staging systems.
Following are differences in the environments,
- captcha is disabled in 'int'
- JavaScript and CSS are not minified in 'dev'.
- HTTP headers are not cached in 'dev'. (May be I should not do this.)
Is it okay to build separately for each environment by passing the environment as argument to build job ? Or the artifact should work for any environment with only changing an external configuration file ? What is the industry conscience on this ?