Add project description here.
- Authenticate your user with Google Cloud
gcloud auth login
- run
npm run artifactregistry-login:local
to authenticate with the artifact repository and persist credentials for npm. - Install the dependencies with
npm install
- Copy
.env.example
as.env
and get missing values from vault - Run
npm run test
to make sure everything is ok - Run the application
npm run dev
- To debug create debug config in webstorm with following config
attach to Node.js/Chrome
- host
localhost
- Port
9229
- Attach to
Chrome or Node.js > 6.3 started with --inspect
- Start the service with
npm run devDebug
dev
: Run the application in development modedevDebug
: Run the application in development mode with remote debugging enabledstart
: Run the application in production mode (prefer not to do that in development)test
: Run the test suite (not implemented yet)lint
: Lint the codebaselintFix
: Lint and fix the codebase
The build and deployment process are triggered by Github Actions. Inside .github folder you will find:
deploy-branch-to-dev.yml
: This action will deploy your code on whichever selected branch, to development environment.open-pr.yml
: This action will happen whenever you open a PR against main, and it will do some basic checks - npm i, npm test, docker buildmerged-pr.yml
: TThis action will happen whenever you successfully merge a PR into main, and will bump the release on your repo, build and push the image with the updated tag and, finally, automatically deploy to development environment (as long as your app exists in k8s-manifest repo!). Note on bumping version: Bumping will be major (1.0.0-->2.0.0), minor(1.0.0-->1.1.0) or patch(1.0.0-->1.0.1) depending on the wording of your SQUASED commit. If using any other merge method, wording is taken from last commit. Default behaviour is patch. Additionally, you have the option to choose a file to be version-bumped (for the moment package.json or version.txt) and, if you want, to have your changelog automatically bumped too.manual-deploy.yml
: This action will deploy the latest release to a selected environment. If deploying to staging, optionally, testim suites can also be launched. In case of doubts, contact your QA team.rollback.yml
: This action will deploy the selected version to the choosen environment. Only chapter leads can deploy a specific version. For a deployment in production to be successful, the version should already be deployed in staging.lint-pr.yml
: This action will happen whenever you open, edit or sync a PR - it will mainly verify the PR so that it looks like:
feat(ui): https://ultimateai.atlassian.net/browse/PLT-000 some explanation of the work you've done.
^ ^ ^
| | |__ Subject
| |_______ Scope
|____________ Type
Called workflows can be found in central-workflows-repository
- Make sure there
k8s-manifests
are ready for this application! - Check all inputs from all files inside .github/workflows. Ask if there's something you don't understand.
⚠️ PLEASE update app_squad parameter inmanual-deploy.yaml
,deploy-branch-to-dev.yaml
,rollback.yaml
andmerged-pr.yaml
⚠️ PLEASE update initial_release parameter to latest image version, if your repository already existed in bitbucket or had a different CI/CD system inmerged-pr.yaml
For local development server token validation is not enabled, here are some examples of requests we can send to the service: