Project Details
There are currently four submodules that are in place and used across different websites.
To ensure code can be locked down to a release we use tags to set a stable point in time and these are deployed via Bamboo.
When working locally we always work on master or a branch from master and PR back into master where the code can be reviewed, merged and tagged.
Submodule Repositories
fitch_master
Bitbucket Repository: https://bitbucket.fitchratings.com/projects/FGMAR/repos/fitch_master/browse
Used on: GameWork, Fitch Group, Fitch Solutions, Fitch Bohua
images
Bitbucket Repository: https://bitbucket.fitchratings.com/projects/FGMAR/repos/images/browse
Used on: GameWork, Fitch Group, Fitch Ratings, Fitch Solutions, Fitch Bohua
js
Bitbucket Repository: https://bitbucket.fitchratings.com/projects/FGMAR/repos/js/browse
Used on: GameWork, Fitch Group, Fitch Solutions, Fitch Bohua, FCA, GICP, Marketo landing pages
scss
Bitbucket Repository: https://bitbucket.fitchratings.com/projects/FGMAR/repos/scss/browse
Used on: GameWork, Fitch Group, Fitch Ratings, Fitch Solutions, Sustainable Fitch, Fitch Bohua, FCA, GICP, Making the Grade, Marketo landing pages
Workflow
Including submodules into a project
Checking out a project that already uses submodules
Some of our projects already use the submodules and these can be checked out when cloning the project by ticking the initialise submodules button and then checking out master for each one.
It can also be done in terminal or similar.
cd making-the-grade
git submodule init
git submodule update
cd web/_scss
git fetch origin
git checkout master --force
Adding submodules to a project
To add submodules to a project following these steps:
Branching
The submodules only have a master branch that tags are created from. When working on a ticket a branch should be created from master using our branching naming conversion, e.g feature/PROJECT-CODE-TICKET-NUMBER-ISSUE = feature/DM-1234-flip-card
PR
When a ticket has been completed and is ready for review, a PR should be raised where the branch is to be merged with master and reviewers added. Each submodule has a different group of reviewers that should review the code:
fitch_master
images
js
scss
If the code doesn’t reach our standard, the work will be flagged and comments added.
If the code is approved it will be merged into master. The approver will then pull the changes from the master branch and create a tag following our tagging standards.
vMAJOR/MINOR/FIX = v2.5.12
The new tag will be pushed and added to the ticket ready to be deployed on the lower environments for QA to test.
TBC
Nested submodules
Deploying to envrionments
