fh-dev-tools
FeedHenry Development Tools
Install
npm install fh-dev-tools -g
Usage
See Available Commands
fh
e.g.
Usage: fh <command> [options] [--debug] [--noprompt]
Commands:
setup Setup this tool
start [Dev] Start the development work of an issue
review [Dev] Create/update pull requests to review the development work
builds [Dev] Show latest successful builds associated with a ticket
deploy [Dev] Deploy builds associated with a ticket via fhcap
merge [Dev] Merge all the pull requests associated with the ticket
finish [Dev] Merge all the pull requests associated with the ticket and resolve the ticket
changelog [Release] Generate release changelog
components [Release] Generate release components versions
release-notes [Release] Generate release notes for a version
versions [Release] Show all release versions
release [Release] Perform the steps required for a release
release-email [Release] Send the release email
report [Util] Generate weekly JIRA report
pw [Util] Lookup a component password e.g. mysql, mongo
Options:
--debug Show debug level logging
--noprompt Skip all the prompts
Setup
fh setup
Then answer the questions.
About Email Setup
During setup, this tool will ask for your Gmail user name and App Password for sending out emails. You should not use your Gmail account's user password here.
If you choose not to set the password, the tool will print out the email content to the console so you can compose the email using other tools. However, the email content will be in Markdown and you may need other tools to support editing emails in Markdown (e.g. You can try Markdown Here). But there is no way to support Mail.app at the moment.
Release
fh release -p [product_name] -v [release_version]
Commands for dev flow
Start working on a JIRA ticket
fh start -t [JIRA Ticket]
This command will:
- Get the JIRA ticket details, figure out what components will be changed
- Creating the new branch in each of the affected component
- Update the ticket status to 'coding in progress'
Creating PRs for buils and code reviews
fh review -t [JIRA Ticket]
This command will:
- Get the JIRA ticket details, figure out what components are changed
- Check if a rebase is required before creating the PR
- Check if the same PR is already created for those components
- Create the PR for each component
- Update the ticket status to 'pull request sent' and add the links of the pull requests
Deploy to PPA
fh deploy -t [JIRA Ticket] -c [Staging Cluster e.g. ppa3 or ppa4]
This command will:
- Get all the component builds associated with the JIRA ticket
- Update the component cookbooks in FHCAP
- Start the deployment to the specified PPA cluster if user agrees
Finish with the JIRA ticket
fh finish -t [JIRA Ticket]
This command will:
- Get all the PRs associated with the JIRA ticket
- Try to merge each PR
- Will check if rebasing is required
- Prompt user for squashing commits
- Push to both origin and upstream
- Delete the merged branches automatically
- Resolve the JIRA ticket