# Billing Reporter

The code is migrated from the DBaaS repo with git logs.

## CI/CD

Once a change is merged to the master branch, an image will be built and pushed to the dev registry, whose image tag is git hash.

Then a PR will be created automatically to bump the image tag in `infra-cd` repo.

Make sure the automated PR is merged and the new image will be deployed to dev and staging.

## How to release

Use the following commands to trigger the Jenkins pipeline, and the image will be tagged with the `v<X.Y.Z>` (like `v0.1.0`).

```bash
# Make the local branch up to date
git checkout master
git pull origin master

# Change the version number
git tag release-v0.1.0
git push --tags
```

**Note: To confirm that the image has already been pushed to the prod registry, you can visit [Jenkins](http://cicd.tidbcloud.com/blue/organizations/jenkins/billing-reporter-ci/branches), click the release version and check the log.**

After pushing the tag, it will trigger an automated PR to bump the image tag in `infra-cd` repo. Approve and merge it. The new image will be deployed to PROD with release process.
