RSF
RSF

Reputation: 598

Deploying database into different environments with application-specific data

I do have a requirement in which I need to deploy my database into different environments with application-specific data on the target environment. For an instance, we are integrating with a 3rd party services and they do have different credentials and other parameters specific to the target environment. Such as credential and endpoints and other parameters for test and prod environments.

Currently, we are using post-deploy DB scripts targetting those environments and stored them on our git repository. I read and heard we should not commit such sensitive information in repositories due to the risk of hacking and stealing.

Can someone suggest a better way (best practices) of handling this requirement in your CI/CD pipeline?

We are using TeamCity and Octopus tools in our CI/CD process.

Appreciate your valuable advice and feedback in this regard. Also feel free to share the best CI/CD practices to overcome such concerns in your development process.

Thanks, RSF

Upvotes: 0

Views: 299

Answers (1)

Alex M
Alex M

Reputation: 2548

I would have approached it by keeping data like usr/psw as a sensitive variables per environment in Octopus.

To deploy I'd use sqlpackage.exe passing in the dacpac and the variables (/v: variable1=value1).

Upvotes: 1

Related Questions