git config --global user.email "<your github email ID>"
git config --global user.name "<your github username>"
-
We need to have the workflow for TMT Api in conjunction with GitHub.(https://github.com/srijanaravali/tmtapi)
-
Clone the repository https://github.com/srijanaravali/tmtapi into
web > tmtapi
.
Here the web
folder resides within the folder which contains all tmt related docker
files. For example your root folder is tmt
then the tmtapi
folder should be present at tmt>web>tmtapi
-
After cloning the above repository navigate to the
tmtapi
folder from your terminal and- run
composer install
. This will take a while. - Then within that directory run
git config core.fileMode false
.
- run
-
- Navigate to
http://localhost:8089/api/tmt
, it will present the lumen homepage
- Navigate to
-
When we go to our local repository and run
git remote -v
then we get this-
origin [email protected]:srijanaravali/tmtapi.git (fetch) origin [email protected]:srijanaravali/tmtapi.git (push)
- So this means we have only one remote added which is the GitHubs's
srijanaravali
one.
-
-
Need to pull in the
develop
andnpn
branches from github's remote.-
git fetch origin git checkout develop git checkout master git checkout npn
- This ensures we have github remote's
develop
andnpn
branch on our local so now switch back to the master branch (git checkout master
).
-
-
Now for developing your ticket firstly create a new branch while being on
master
.- Suppose the ticket that you are working on is
TMT-89
then create a new branch with the nameTMT-89
by -
git checkout master git checkout -b tmt-89
-
After you have done all your development on this ticket add all the files to be commited, commit all the files to be commited and lastly push this ticket to GitHub
-
git add <your files> git commit -m "<give a proper comment>" git push origin tmt-89
- Please follow this commit commenting pattern.
Ticket #<Ticket number> <Your comment.>
- Example:
Ticket #TMT-89 This is my test comment.
-
-
Then go to your GitHub repo on browser (https://github.com/srijanaravali/tmtapi) and there you will be prompted to create a pull request (PR) (click on the Compare & Pull request). After clicking on the Compare & Pull request button we will be taken to another page where we will be given a button to Create pull request. Click on it and your pull request will be created. Then assign it to a Reviewer.
-
Then in order to unit test our changes on dev env we need to merge github's ticket (in this case it is tmt-89) branch into
develop
branch.-
git checkout develop git pull origin tmt-89 git push origin develop
- Then goto https://TBD(to be decided) to test your changes.
-
-
Then in order to QA our changes on npn env we need to checkout to the branch
stage
and pull all the changes made in your ticket(TMT 89) into this branch and push it to GitHub-
git checkout npn git pull github tmt-89 git push origin npn
- Then goto https://TBD(to be decided) to test your changes.
-
-
Once the QA approves it your ticket will be merged into GitHub
master
and consequently toprod env
.