This project automatically deploys code when a push is made to a repository. It takes terraform code from github and sends it to Jenkins where the resources are deployed to Snowflake.
This method helps software developmet, you continuously build, test and deploy code changes. This helps to automate multiple proceses. Each change submitted to an application, even to development branches, is built and tested automatically and continuously. These tests ensure the changes pass all tests, guidelines, and code compliance standards you established for your application.
In Snowflake console add user and give neccecary with following commands:
- CREATE USER "tf-snow" PASSWORD='examplepassword' DEFAULT_ROLE=PUBLIC MUST_CHANGE_PASSWORD=FALSE;
- GRANT ROLE SYSADMIN TO USER "tf-snow";
- GRANT ROLE SECURITYADMIN TO USER "tf-snow";
- Get the account locator and region
- SELECT current_account() as YOUR_ACCOUNT_LOCATOR, current_region() as YOUR_SNOWFLAKE_REGION_ID;
- Build docker image for Jenkins
- Run the container
- Add neccecary plugins
- Inside Jenkins add new task "Multibranch pipeline"
- Specify github link
- Make changes to Jenkinsfile
- Add neccecary credentials in "Manage Jenkins" > "Manage credentials"
- Add neccecary branches
- In "settings" > "webhooks", add webhook url http:///github-webhook/