Before we start any of the operations after you do vagrant ssh
(after going inside the guest system) please run these two steps
git config --global user.email "<your github email ID>"
git config --global user.name "<your github username>"
-
We need to have the workflow in conjunction with GitHub.(https://github.com/srijanaravali/gcmarketplace)
-
When we go to our local repository and run
git remote -v
then we get this
origin git@github.com:srijanaravali/gcmarketplace.git (fetch)
origin git@github.com:srijanaravali/gcmarketplace.git (push)
So this means we have only one remote added which is the GitHubs's one.
- Now we need to sync the github's remote
master
branche. So for that we need to do the following
git pull origin master
- Need to pull in the
develop
andstage
branches from github's remote.
git fetch origin
git checkout develop
git checkout master
git checkout stage
This ensures we have github remote's develop
and stage
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 GC-89
then create a new branch with the name GC-89
by
git checkout master
git checkout -b gc-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 gc-89
Please follow this commit commenting pattern.
Ticket #<Ticket number> <Your comment.>
Example:
Ticket #GC-89 This is my test comment.
-
Then go to your GitHub repo on browser (https://github.com/srijanaravali/gcmarketplace) 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 azure we need to merge github's ticket (in this case it is gc-89) branch into
develop
branch.
git checkout develop
git pull origin gc-89
git push origin develop
Then goto https://pttgcdevelop.azurewebsites.net/ to test your changes.
- Then in order to QA our changes on Azure we need to checkout to the branch
stage
and pull all the changes made in your ticket(GC 89) into this branch and push it to GitHub
git checkout stage
git pull github gc-89
git push origin stage
Then goto https://pttgcstage.azurewebsites.net/ to test your changes.
- Once the QA approves it your ticket will be merged into GitHub
master
and consequently toAzure's
prod
.
Before committing your code if you have added/edited any custom files(ignore the configuration and auto generated files) then we need to check for standards!
scss-lint <path/to/your/file>
If we have added/edited any custom files(PHP/Drupal related) then to check the standards of that file run
drupalcs <path/to/your/file>
drupalcsp <path/to/your/file>