{"id":38129687,"url":"https://github.com/bratislava/bratiska-cli","last_synced_at":"2026-01-16T22:36:12.702Z","repository":{"id":75311554,"uuid":"490292931","full_name":"bratislava/bratiska-cli","owner":"bratislava","description":"simple command line utility for app deployment","archived":false,"fork":false,"pushed_at":"2025-10-02T21:18:29.000Z","size":1395,"stargazers_count":1,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-02T23:27:37.886Z","etag":null,"topics":["bratislava","deployment","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bratislava.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-09T13:22:36.000Z","updated_at":"2025-09-25T13:20:23.000Z","dependencies_parsed_at":"2024-04-22T07:29:10.299Z","dependency_job_id":"79dacb62-2e40-4afb-bcd5-8660a81d243f","html_url":"https://github.com/bratislava/bratiska-cli","commit_stats":null,"previous_names":[],"tags_count":120,"template":false,"template_full_name":null,"purl":"pkg:github/bratislava/bratiska-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bratislava%2Fbratiska-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bratislava%2Fbratiska-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bratislava%2Fbratiska-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bratislava%2Fbratiska-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bratislava","download_url":"https://codeload.github.com/bratislava/bratiska-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bratislava%2Fbratiska-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28485425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bratislava","deployment","kubernetes"],"created_at":"2026-01-16T22:36:11.107Z","updated_at":"2026-01-16T22:36:12.677Z","avatar_url":"https://github.com/bratislava.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"```bash\n ____                   _     _         _                             _   _\n| __ )   _ __    __ _  | |_  (_)  ___  | | __   __ _            ___  | | (_)\n|  _ \\  | '__|  / _` | | __| | | / __| | |/ /  / _` |  _____   / __| | | | |\n| |_) | | |    | (_| | | |_  | | \\__ \\ |   \u003c  | (_| | |_____| | (__  | | | |\n|____/  |_|     \\__,_|  \\__| |_| |___/ |_|\\_\\  \\__,_|          \\___| |_| |_|\n```\n\n### Simple deployment utility for our Bratislava projects\n\n## Installation\n\nInstalling dependencies\n\n```bash\nyarn global add bratislava/bratiska-cli@stable\n```\n\n#### Note\n\nThis utility needs `linux` based operating system to run properly. If you are using `Windows`, you can use `WSL` to run\nit.\n\n### Versions\n\nWe provide three versions of `bratiska-cli`:\n\n- `stable` - this is the stable version of `bratiska-cli` which is sometimes more versions behind than `beta`. And it is\n  used in our CI/CD pipelines.\n- `beta` - this is the latest version of `bratiska-cli` which is not always stable\n- `vX.X.X` - this is the specific version of `bratiska-cli` which is not always stable, but it usually the latest.\n\nTo install specific version of `bratiska-cli` use:\n\n```bash\nyarn global add bratislava/bratiska-cli#vX.X.X\n```\n\nTo install `beta` version of `bratiska-cli` use:\n\n```bash\nyarn global add bratislava/bratiska-cli#beta\n```\n\nTo install `stable` version of `bratiska-cli` use:\n\n```bash\nyarn global add bratislava/bratiska-cli#stable\n```\n\n## Prerequisites\n\nTo be able to work with this utility, you need to have a few things configured. Different commands require different\naccesses.\nHow to install required tools and how to configure them is described bellow this list. This utility runs only on `linux`\nbased operating systems.\n\n### `tag` command\n\nIs the simplies command, it requires only:\n\n- installed `git`\n- correct access rights to github repository.\n\n### `build_image` command\n\nRequires more things to be installed and configured:\n\n- installed `git`\n- installed `docker`\n- access rights to docker repository\n- access rights to github repository\n\n### `build_kustomize` command\n\nRequires even more things to be installed and configured:\n\n- installed `git`\n- installed `docker`\n- installed `kustomize`\n- installed `envsubst`\n- access rights to docker repository\n- access rights to github repository\n\n### `deploy` command\n\nThe most complex command, requires much more things to be installed and configured:\n\n- installed `git`\n- installed `docker`\n- installed `kustomize`\n- installed `envsubst`\n- installed `kubectl`\n- access rights to docker repository\n- access rights to github repository\n- access rights to kubernetes cluster\n\n### `label` command\n\nIf you need to add label to kubernetes resources, you can use this command. It requires:\n\n- installed `git`\n- installed `kubectl`\n- access rights to kubernetes cluster\n\n#### Accesses:\n\n1. Docker Harbor access - can be\n   granted [here](https://portal.azure.com/#view/Microsoft_AAD_IAM/ManagedAppMenuBlade/~/Users/objectId/7b1ee611-cf01-4179-a765-215ee291f687/appId/216af6db-a39f-44b3-94d1-fd5142f14e6a) (\n   note\n    - [OIADS_EMPLOYEES](https://portal.azure.com/#view/Microsoft_AAD_IAM/GroupDetailsMenuBlade/~/Members/groupId/48fcf79f-46c5-44fc-8608-70eb512f840c)\n      are included by default)\n2. Kubernetes access - contact the IT department\n3. Github access on github.com/bratislava - contact the IT department\n\n#### Install guides\n\n1. Installed `git` (https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n2. Installed `kubectl` (https://kubernetes.io/docs/tasks/tools/)\n3. Installed `Bratislava kubectl vsphere plugin`, you need to be connected on cable or through VPN to magistrat (https://k8s.tanzu.bratislava.sk/)\n  - Windows - copy `kubectl` and `kubectl-vsphere` to `c:/windows/system32` (needed admin rights) otherwise `kubectl vsphere login` commands will not work\n4. Installed `kustomize` (https://kubectl.docs.kubernetes.io/installation/kustomize/)\n5. Installed `docker` (https://docs.docker.com/engine/install)\n6. Installed `envsubst` (`brew install gettext`)\n7. Kustomization files in `/kubernetes` folder\n\n#### Required running apps:\n\nThese apps needs are running when you use `bratiska-cli`:\n\n- running `docker`\n- You must be signed in to our docker repository `harbor.bratislava.sk`. See the manual below.\n\n    ```bash\n    docker login https://harbor.bratislava.sk\n    ```\n  For Windows WSL use:\n    ```bash\n    docker login harbor.bratislava.sk\n    ```\n- You need to have running `kubect` and be signed into the Kubernetes cluster. If you have issues signing to Kubernetes,\n  contact your administrator.\n\n## Usage\n\n### command `tag`\n\nThis is the simpliest command of `bratiska-cli`. We are using it for our CI/CD. It is creates a tag on the current\nbranch and pushes it to the remote repository. Before creating the tag, it checks if the current branch is clean and if\nthere are any untracked files, and it is pulling the newest version from the repository. Then it tries to dtermine the\nbranch, enviroment or user to create proper tag value for some enviroments (see bellow tag values).\n\n#### Add tag\n\nTo tag a version of a code you can simply run just this command. Please note that this command will create a tag locally\nand on remote repository.\nThis creates a dynamic tag based on your current environment (checking it from kubernetes if authorized). See tags\nformat bellow.\n\n```bash\nbratiska-cli tag\n```\n\n##### Specify environment\n\nYou don't have to use automatic environment, there is also option to specify `env` in command:\n\n```bash\nbratiska-cli tag dev\n```\n\nAllowed `env` values are `dev`, `staging`, `prod`.\n\n##### Specify environment and tech\n\nMaybe you would like to invoke only deployment of `strapi` or `next` so use this command:\n\n```bash\nbratiska-cli tag staging-strapi\n```\n\nor\n\n```bash\nbratiska-cli tag staging-next\n```\n\n##### Specify environment, tech and version\n\nAutomatically to every tag we increment last value. So if a tag is on `staging-strapi1.2.2` it will be automatically\nincremented to `staging-strapi1.2.3`.\n\n```bash\nbratiska-cli tag staging-strapi\n```\n\nIf you did some feature update, use feature flag `--feature` to increment feature version from `staging-strapi1.2.2`\nto `staging-strapi1.3.0`\n\n```bash\nbratiska-cli tag staging-strapi --feature\n```\n\nAnd if you did major change, you can use `--major` flag to increment from `staging-strapi1.2.2` to `staging-strapi2.0.0`\n\n```bash\nbratiska-cli tag staging-strapi --major\n```\n\nor you can specify tech by using `--tech` flag:\n\n```bash\nbratiska-cli tag staging --tech strapi\n```\n\n##### Specify tag value\n\nSometimes you need different tag value, so use `--tag` flag to define your custom tag:\n\n```bash\nbratiska-cli tag --tag stable\n```\n\nor just specify version:\n\n```bash\nbratiska-cli tag --tag v1.2.3\n```\n\n##### Tag local only\n\nTo tag only locally use `--local` flag:\n\n```bash\nbratiska-cli tag --local\n```\n\n##### Tag local only without pulling changes from the remote repository\n\nTo tag only locally use `--local --no_pull` flag:\n\n```bash\nbratiska-cli tag --local --no_pull\n```\n\n#### Delete tag value\n\nIf you need to delete tag, you can use automatic last tag delete by tech, or you can specify it. Just add `--delete`\nflag.\n\n```bash\nbratiska-cli tag --tag stable --delete\n```\n\n(deletes `stable` tag)\n\n```bash\nbratiska-cli tag dev-next --delete\n```\n\n(deletes last `dev-next` tag)\n\n#### Recreate tag value\n\nIf tag is already created on different commit, you can recreate it on your current commit like:\n\n```bash\nbratiska-cli tag --tag stable --recreate\n```\n\n(delete old `stable` and create it in a current commit)\n\n#### Debugging\n\nIf you have some problem, there is always option to use --debug flag to print more info.\n\n```bash\nbratiska-cli tag --tag stable --recreate --debug\n```\n\nor use `--dry_run` flag to see what will be done:\n\n```bash\nbratiska-cli tag --tag stable --recreate --dry_run\n```\n\n#### Tags format\n\nFor every environment we have different tag format:\n\n##### Environment `dev`\n\nTags are based on format `{env}-{tech}-{branch}-{commit_short}-{user_name}` so it can be\nlike: `dev-next-master-4a18e16-richi`\n\n##### Environment `staging` and `prod`\n\nTags are based on format `{env}-{tech}{version}` so it can be like `staging-next1.4.7`\n\n#### Versions format\n\nVersions are done in a way:\n\n- bugfix is incrementing last digit `0.0.1`\n- feature is incrementing middle digit `0.1.0`\n- major is incrementing first digit `1.0.0`\n\n### command `build_image`\n\nFor building images we are using command `build_image`. It is building image from Dockerfile in the current directory\nand pushing it to our docker repository.\n\n#### Build image\n\nThe simplest usage is using command without any flags. It will build image from Dockerfile in the current directory and\npush it to our docker repository.\n\n```bash\nbratiska-cli build_image\n```\n\n#### Don't push image to the registry\n\nIf you don't want to push image to the registry, use `--build_image_no_registry` flag.\n\n```bash\nbratiska-cli build_image --no_push\n```\n\n#### Specify image registry\n\nIf you want to specify image registry, use `--registry` flag.\n\n```bash\nbratiska-cli build_image --registry harbor.example.com\n```\n\n#### Specify namespace\n\nIf you want to specify for harbor, use `--namespace` flag.\n\n```bash\nbratiska-cli build_image --namespace wordpress\n```\n\n#### No image registry check\n\nCLI will tell you that image you are building is already in registry. To skip this check use `--no_image_repo_check`\nflag.\n\n```bash\nbratiska-cli build_image --no_image_repo_check\n```\n\n#### Define build time sentry\n\nIf you want to define build time sentry token, use `--sentry` flag.\n\n```bash\nbratiska-cli build_image --sentry 1234567890\n```\n\n#### Force rebuild an image\n\nIf you want to force rebuild an image, use `--force_rebuild` flag. It is needed for overriding cache and image tag.\n\n```bash\nbratiska-cli build_image --force_rebuild\n```\n\n##### Specify the tag value\n\nIf you want to specify tag for the image, use `--tag` flag.\n\n```bash\nbratiska-cli build_image --tag 6.2-wordpress-php-fpm8.2\n```\n\n#### Debugging\n\nIf you have some problem, there is always option to use --debug flag to print more info.\n\n```bash\nbratiska-cli build_image --force_rebuild --debug\n```\n\nTo use beta functionality, you can use `--beta` flag.\n\n```bash\nbratiska-cli build_image --force_rebuild --beta\n```\n\n\n### command `build_kustomize`\n\nIf you want to just build kustomize from the source `/kubernetes` folder you can use `build_kustomize` command.\n\n#### Build kustomize\n\nThis commands build kustomize from the source `/kubernetes` folder. Please note that you need have already ready image\nin the registry.\n\n```bash\nbratiska-cli build_kustomize\n```\n\n#### Specify image environment\n\nIf you want to specify image environment, use:\n\n```bash\nbratiska-cli build_kustomize dev\n```\n\nallowed values are `dev`, `staging` and `prod`\n\n#### Build image with custom image\n\nIf you want to build image with custom image, use `--image` flag. Please note that you need have already ready image in\nthe registry.\n\n```bash\nbratiska-cli build_kustomize --image harbor.example.com/standalone/nest-prisma-template/master-4a18e16-richi\n```\n\nif you want to just use whatever image, then after `--image` flag type app package name, like `nest-prisma-template`\n\n```bash\nbratiska-cli build_kustomize --image app-package-name\n```\n\n#### No image registry check\n\nCLI will tell you that image you are building is already in registry. To skip this check use `--no_image_repo_check`\nflag.\n\n```bash\nbratiska-cli build_kustomize --no_image_repo_check\n```\n\n#### Specify namespace\n\nIf you want to specify kubernetes namespace together with harbor namespace (we use it together), use `--namespace` flag.\n\n```bash\nbratiska-cli build_kustomize --namespace standalone\n```\n\n#### Specify deployment name\n\nIf you want to specify kubernetes deployment name, use `--deployment` flag.\n\n```bash\nbratiska-cli build_kustomize --deployment nest-prisma-template\n```\n\n#### Specify kustomize path\n\nIf you want to specify kustomize address path, use `--kustomize` flag.\n\n```bash\nbratiska-cli build_kustomize --kustomize /new_kubernetes\n```\n\n#### Define host address\n\nIf you want to define host address, use `--host` flag.\n\n```bash\nbratiska-cli build_kustomize --host nest-prisma-template.example.com\n```\n\n#### Debugging\n\nIf you have some problem, there is always option to use --debug flag to print more info.\n\n```bash\nbratiska-cli build_kustomize --debug\n```\n\nTo use beta functionality, you can use `--beta` flag.\n\n```bash\nbratiska-cli build_kustomize --beta\n```\n\n### command `deploy`\n\nBefore you run any of the following commands, make sure you are\n\n1. logged in to harbor (see [running apps](#running-apps) above, as well as the [signing to harbor](#signing-to-harbor)\n   section below)\n2. logged in to correct cluster (replace `\u003cenv\u003e` is one of `dev`, `staging` or `prod` and `user.name@bratislava.sk` with\n   your credentials)\n\n- to login through Windows you need to set password `export KUBECTL_VSPHERE_PASSWORD={{password}}`\n\n```\nkubectl vsphere login --server=10.10.10.1 --insecure-skip-tls-verify --tanzu-kubernetes-cluster-name=tkg-innov-\u003cenv\u003e -u user.name@bratislava.sk\n```\n\n3. if you are logged in to multiple clusters, make sure you are using the correct\n   one - `kubectl config use-context tkg-innov-\u003cenv\u003e`\n\n#### Simple deploy\n\nThere is straightforward usage because the utility tries to obtain all values from the repo automatically, and if\nsomething is missing, it will point out.\n\n```bash\nbratiska-cli deploy\n```\n\n#### Specify deploy environment\n\nif you want to specify image environment, use:\n\n```bash\nbratiska-cli deploy dev\n```\n\nallowed values are `dev`, `staging` and `prod`.\n\n#### Also you can specify all options manually\n\n```bash\nIf you need to deploy to staging or production, you need to add a special flag to the command.\n\n```bash\nbratiska-cli deploy --staging\n```\n\nor\n\n```bash\nbratiska-cli deploy --production\n```\n\n#### Deploy with a special image\n\nIf you have a specified image, you can deploy it.\n\n```bash\nbratiska-cli deploy --image harbor.bratislava.sk/standalone/nest-prisma-template:bratiska-cli-3f3ce4fd14c76138a081596b2987a81f18a3c747-master-untracked\n```\n\n#### Specify kustomize file or folder\n\nIf you want, you can specify the kustomize file or kustomize folder with this command:\n\n```bash\nbratiska-cli deploy --kustomize ./path/path\n```\n\n#### Dry run, without deploying to Kubernetes\n\nIf you don`t want to deploy to Kubernetes, then you can run it with a dry run flag:\n\n```bash\nbratiska-cli deploy --dry_run\n```\n\n#### Namespace\n\nThe default namespace for utility is `standalone`, but you can change it to other like:\n\n```bash\nbratiska-cli deploy --namespace=bratislava-monorepo\n```\n\n#### Deployment\n\nDefault deployment for the app names from `project.json`, but you can change it like:\n\n```bash\nbratiska-cli deploy --deployment=nest-prisma-template-super-duper\n```\n\n#### Host\n\nDefault deployment host for an app depends on `deployment` and `environment`, but you can change it like:\n\n```bash\nbratiska-cli deploy --host=starwars.bratislava.sk\n```\n\nOr you switch env with `kubectl config use-context tkg-innov-dev`\n\n#### Registry\n\nIf you want to use a different registry like `ghcr.io`, you can change it here, but don`t forget to add new credentials.\n\n```bash\nbratiska-cli deploy --registry=ghcr.io\n```\n\n#### Staging and Production\n\nTo deploy to the stage, you need to add `--staging` flag, and your changes need to be committed and pushed to branch to\nour repository. You can`t have untracked changes.\n\nThe same applies to production, so you must use `--production`, and changes must be merged to master. Otherwise, you\ncan`t update production.\n\n```bash\nbratiska-cli deploy --staging\n```\n\n#### Skip deployment check\n\nIf you are deploying some cron jobs to kubernetes, there is nothing to check if the deployment was successful, so in\nthat case, we have this option flag you can use.\n\n```bash\nbratiska-cli deploy --skip_deployment_check\n```\n\n#### Debug\n\nIf you need to debug the deploy process, you can add the `--debug` option. This will save the kustomize manifest to the\ndirectory so you can inspect it. Also, it does not delete the image from docker, so you can look at it.\n\n```bash\nbratiska-cli deploy --debug\n```\n\n### Examples\n\nDry run with custom image and specified folder to kustomize.\n\n```bash\nbratiska-cli deploy --dry_run --image harbor.bratislava.sk/standalone/nest-prisma-template:bratiska-cli-3f3ce4fd14c76138a081596b2987a81f18a3c747-master-untracked --kustomize ./kubernetes/base\n```\n\n### command `label`\n\nThis command allow you to add lables to kubernetes resources. You can specify resources by name or by label selector. As\nsecrets don't have app name labels, bratiska-cli tries to use some predefined most used secrets to try to hit correct\nsecret for that app.\nKubernetes resource with new label looks like this:\n\n```yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: nest-forms-backend-app\n  namespace: standalone\n  labels:\n    app: nest-forms-backend\n    source: nest-forms-backend\n    labelkey: labelvalue\n```\n\n#### Simple add label to kubernetes app\n\nIf you want to add label to almost all resources which has a deployment like `nest-prisma-template`, you can use this\ncommand:\n\n```bash\nbratiska-cli label key=value \n``` \n\nPlease note that you need to be in folder where is `project.json` file from which we determine the name of the app.\nIn normal run you don`t need to specify resource, because label command is taking all these resources into account:\n\n```bash\npods\ndeployments\nstatefulsets\npersistentvolumeclaims\nservices\nendpoints\ningresses\nconfigmaps\nsealedsecrets\nsecrets\n```\n\n#### Add label on staging or production\n\nJust as in other cases you can use `--staging` or `--production` flag to confirm environment. You also need to have\nkubectl context set to correct cluster.\n\n```bash\nbratiska-cli label key=value --staging\n```\n\nor\n\n```bash\nbratiska-cli label key=value --production\n```\n\n#### Specify resource which needs to be tagged\n\nIf you want to tag only one resource, you can use this command:\n\n```bash\nbratiska-cli label key=value --resources=deployments\n```\n\n#### Specify secret which needs to be tagged\n\nIf your app has some secret which was not taged from general list of secrets, you can specify it like this:\n\n```bash\nbratiska-cli label key=value --secret=database-secret\n```\n\nUsually secret has a name `nest-prisma-template-database-secret`, but you have to specify it without app name.\n\nHere is the list of secrets which are trying to be tagged by default:\n\n```bash\ntls\ndatabase-secret\ngeneral-secret\nmailgun-secret\nazure-secret\ninternals-secret\nmeilisearch-secret\nplugin-preview-secret\ncognito-secret\nmagproxy-secret\nscanner-secret\nforms-secret\napp-secret\nmapbox-secret\nmsal-secret\nginis-secret\n```\n\nIf secret does not exist in the namespace `label` command will just skip it and says that secret does not exist.\n\n```bash\nError from server (NotFound): secrets \"nest-forms-backend-mapbox-secret\" not found\nsecret mapbox-secret does not exist. Skipping...\n```\n\n#### Add label to subset of resources\n\nThis feature is not yet fully implemented in the version `3.0.0` but if you need to add label to sub resources you can\nuse:\n\n```bash\nbratiska-cli label key=value --recursive\n```\n\nPlease not that this will restart the current running pods.\n\n## Automatisation\n\n### Bratiska-cli args in config.json\n\nYou can automatize the running of the utility with a configuration file, which can overwrite startup arguments. If you\nneed to have some permanent settings on the environment, you can define a config\nin `/kubernetes/envs/[Dev,Staging,Prod]` with the name `config.json`. Config is overriding all options passed or\nautomatically assessed by the bratiska-cli utility. Example of config:\n\nExample of `config.json` file\n\n```json\n{\n  \"host\": \"bratislava.sk\",\n  \"env\": \"prod\"\n}\n```\n\n### Environment variables for kustomize\n\nYou can extend `config.json` with custom environment variables for kustomize attributes. For example, you can define\nsome\nsettings in kustomize, which needs to be dynamic like:\n\n```yml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: ${BUILD_REPOSITORY_NAME}-app\n  namespace: ${NAMESPACE}\n  labels:\n    service: app\n```\n\nSo `${BUILD_REPOSITORY_NAME}` is env variable `BUILD_REPOSITORY_NAME` which you can define in `config.json` like here:\n\n```json\n{\n  \"host\": \"gmb.sk\",\n  \"envs\": {\n    \"BUILD_REPOSITORY_NAME\": \"super-duper-app\"\n  }\n}\n```\n\nBtw `BUILD_REPOSITORY_NAME` is automatically created from `package.json`, so there is no need to create it\nin `config.json`\n\n### Environment variables for docker next build\n\nSometimes you need to have different environment variables for other clusters during docker next build with bratiska.\nYou can\nachieve it by creating files:\n\n`.env.bratiska-cli-build.dev`\n`.env.bratiska-cli-build.staging`\n`.env.bratiska-cli-build.prod`\n\nWhich is then loaded by bratiska-cli, and all its content is copied to file `.env.production.local`, which is then\nloaded to docker and processed by next during the build. More info regarding the next envs can be found\nhere: https://nextjs.org/docs/basic-features/environment-variables\n\n### Environment variables passed to kustomize files\n\n```dotenv\nBUILD_REPOSITORY_URI\n```\n\nGit repository uri, and if is an external image, then the value is `using_external_image`\n\n```dotenv\nBUILD_REPOSITORY_NAME\n```\n\nname from package.json\n\n```dotenv\nDEPLOYMENT_ENV\n```\n\nit is used in URL addresses like `DEPLOYMENT_ENVbratislava.sk`\ndev =\u003e `dev.`\nstaging =\u003e `staging.`\nprod =\u003e `` (is empty)\n\n```dotenv\nENV\n```\n\nCan have three values: `dev`, `staging`, `prod`\n\n```dotenv\nHOSTNAME\n```\n\nor\n\n```dotenv\nBRATISKA_HOSTNAME\n```\n\nthe hostname of the app\n\n```dotenv\nIMAGE_TAG\n```\n\ncomplete image tag with URL and tag\nlike `harbor.bratislava.sk/municipal-police/zandaris:bratiska-cli-1.5.64-pipelines-1e6277615d3649300384a399f7cb6a8c12a0e128-master-v0.3.1`\n\n```dotenv\nIMAGE\n```\n\nimage part of `IMAGE_TAG` like `harbor.bratislava.sk/municipal-police/zandaris`\n\n```dotenv\nTAG\n```\n\ntag value `bratiska-cli-1.5.64-pipelines-1e6277615d3649300384a399f7cb6a8c12a0e128-master-v0.3.1`\n\n```dotenv\nGIT_TAG\n```\n\nvalue of git tag used in a deployment like `dev1.47.`\n\n```dotenv\nCOMMIT\n```\n\nvalue of commit `1e6277615d3649300384a399f7cb6a8c12a0e128` and if we are using external image then value\nis `using_external_image`\n\n```dotenv\nNAMESPACE\n```\n\nNamespace where should be image deployed like `standalone`\n\n```dotenv\nIMAGE_PULL_SECRET\n```\n\nan Image pull secret name, which is then checked if it exists on Kubernetes\nlike `harbor-secret-dev-standalone-bratiska-cli`\n\n```dotenv\nINTERNAL_APP_PORT\n````\n\nApp port which is then exposed to the public like `1338`\n\n## More manuals\n\n### Signing to harbor\n\nWe need to configure a harbor connection for uploading images to the registry.\n\n1. Open our registry website: https://harbor.bratislava.sk\n2. Sign in with your Azure account\n3. Copy CLI secret from your profile. Follow the picture guide:\n\n    - Go to your profile in the right top corner:\n\n      ![alt text](./public/readme/user.png)\n\n    - Click on `User Profile\n    - Copy `CLI secret`\n      ![alt text](./public/readme/profile.png)\n\n4. Sign in docker with the command:\n\n```bash\ndocker login https://harbor.bratislava.sk\n```\n\nYou use your username `your.name@bratislava.sk` and `CLI secret` value 5. When you see `Login Succeeded,` then you are\ndone 👏\n\n## Development\n\nYou need to pull this repo with\n`git clone bratislava/bratiska-cli`. Then you can build it with the command: `yarn run build`. You could test it locally\nwith `yarn run start` if everything were built fine.\n\n\n## Release\n\nCreate tag:\n```bash\ngit tag -a v1.3.5 -m \"1.3.5 env fix\" \n```\n\nPush tag\n```bash\ngit push origin v1.3.5\n```\n\n## Stay in touch\n\n- If you find some bug, please get in touch with us on GitHub or mail inovacie@bratislava.sk\n- Website - [https://inovacie.bratislava.sk/](https://inovacie.bratislava.sk/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbratislava%2Fbratiska-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbratislava%2Fbratiska-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbratislava%2Fbratiska-cli/lists"}