Each new feature should a separate branch. Each branch should have its own image which can be deployed to the QA server for testing.
After fully testing, the branch should be merged with development and deployed to Dev Server
If everyone is satisfied with Dev Server version, then we deploy it to Staging Server.
During the QA and Deployment process, docker image should be passed between different server in order to control the env difference
There should be an easy method to replicate the real data from Staging server and deploy it into the Dev and QA server.
- Create a new feature branch from development within bitbucket
- The branch name should explain the current version, Jira task number, and date
- Install the gcloud on your local
- Update gcloud command line tools to the latest version
- Install Docker on your local
- Make sure the Docker is running
/deploymentToolBox /QA /createAndPushImagesToContainerRepository.sh /Dockerfile
A Cluster has been created for QA and Staging
gcloud container clusters get-credentials sl-qa-staging-api-cluster --zone asia-east1-a --project stream-lending
In ruby symbol is different compared with string. You cannot directly use the string to call the attribute within on hash array.
The data type of hash array keys is symbol. Therefore, we need to convert string to the symbol to check if it’s existing in the array.
to_sym() public Returns the Symbol corresponding to str, creating the symbol if it did not previously exist. See Symbol#id2name. "Koala".intern #=> :Koala s = 'cat'.to_sym #=> :cat s == :cat #=> true s = '@cat'.to_sym #=> :@cat s == :@cat #=> true This can also be used to create symbols that cannot be represented using the :xxx notation. 'cat and dog'.to_sym #=> :"cat and dog"