- Documentation for frontend development - both web apps and standalone components
- Deployment guide
- gdrive-image-uploadr - has all of the standards to be used in React applications
- Color scheme - (in order from dark to light):
- #004080 (darkest, used in header and footer)
- #0059b3 (halfway point between this and medium, which is kind of bright)
- #0073e6 (medium)
- #3399ff
- #80c1ff
- #cce6ff
- #e6f2ff (lightest)
- Make sure all tests are passing and write documentation as necessary
- Run
npm run build
to generate the library - Merge changes into develop, then master
- Tag this release:
- Run
git tag -a v1.0.0 -m "version 1.0.0"
where the version number is the one that needs to be updated - Push tag to branch, i.e.
git push origin v1.0.0
- To delete local tag, run
git tag -d tagName
- To delete remote tag, run
git push --delete origin tagName
- If updating or creating helm chart, create a tarball with
helm package PATH_TO_CHART
- Put this tarball in the
docs
folder in kubernetes-charts repo and then runhelm repo index ./docs
to update theindex.yaml
file.
Workflow:
- Push changes to develop
- Wait for Docker Hub to build it.
- Upgrade your chart
Quick workflow:
- Build it in your machine with any tag (i.e.
docker build -t eric/user-exp:dev1 .
)
- Note: if Dockerfile is not in root path, use
docker build -f build/Dockerfile -t eric/user-exp:dev1 .
)
- Push it to the Minikube Docker daemon (activate with
eval $(minikube docker-env)
) - Upgrade your chart with that particular tag
helm upgrade [RELEASE NAME] [CHART] --namespace dictybase [ARGS] --set image.repository=eric/user-exp --set image.tag=dev1 --set image.pullPolicy=IfNotPresent
Dev/prod workflow:
- Push to
develop
-> new image -> pull and test in minikube - Rebase
develop
inmaster
, create new tag and push bothmaster
and tag - New image -> Sidd deploys it to staging cloud
Remember update the staging dockerfile as necessary
- GitFlow - branching model for Git
- Delete last commit:
git reset --hard HEAD^
- Delete last commit on remote branch:
git push origin +branchName
- Delete local branch:
git branch -d branchName
- Delete remote branch:
git push origin --delete branchName
- Rebase while in
develop
:git rebase branchName
- Exclude folder from search:
git grep XYZ ':!docs'
- Guide on testing IE in VirtualBox/Vagrant on a Mac
- Updated Vagrantfile for IE testing
- The Right Way to Test React Components
- Writing Tests - Redux
Questions to ask for test "contracts":
- What does it render?
- What props does it receive?
- What state does it hold?
- What does the component do when the user interacts with it?
- What is the context the component is rendered in?
- What side effects occur as part of the component lifecycle (i.e. componentDidMount)
- Does my component render different things under different circumstances?
- When I pass a function as a prop, what does my component use it for? Does it call it, or just give it to another component? If it calls it, what does it call it with?
- The Twelve-Factor App
- Introduction to Docker
- Kubernetes In-Browser Course
- Running webapp locally in Docker:
docker run -it -p 9595:9595 [BUILD]
Debugging GH Actions
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
run: echo "$STRATEGY_CONTEXT"
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJson(matrix) }}
run: echo "$MATRIX_CONTEXT"