Change custom JavaScript file within the CI/CD process

In our application we are using AppDynamics End User Monitoring. This allows us to track the end users experience in our application. To do this we add a JavaScript file in the theme/js folder and call it on the Index.html page. Within the JavaScript file we set an environment specific key to be able to send the data to the correct controller. Our CI/CD process uses the Mendix Build and Deploy APIs to move the packages from one environment to another. Is there any way for us to change the JavaScript file during the deploy process? I would like to make the process as generic as possible so it can be used with multiple applications. If it is not possible to change this file in the build/deploy process is there any other way to do this besides hard coding environment host names and keys?
0 answers