qontract-development-cli 0.14.3__tar.gz → 0.14.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/PKG-INFO +1 -1
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/pyproject.toml +1 -1
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/templates/compose.yml.j2 +4 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/templates.py +4 -1
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/setup.py +1 -1
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/README.md +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/__init__.py +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/__main__.py +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/cli.py +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/commands/__init__.py +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/commands/config.py +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/commands/env.py +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/commands/profile.py +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/completions.py +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/config.py +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/models.py +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/shell.py +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/templates/compose.override.yml.j2 +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/templates/prep-worktree.sh.j2 +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/utils.py +0 -0
- {qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/watchdog.py +0 -0
|
@@ -6,6 +6,7 @@ services:
|
|
|
6
6
|
internal-certificates:
|
|
7
7
|
image: quay.io/app-sre/internal-redhat-ca:latest
|
|
8
8
|
container_name: internal-certificates
|
|
9
|
+
platform: linux/amd64
|
|
9
10
|
command: |
|
|
10
11
|
sh -c 'cp -r /etc/pki/. /tmp/'
|
|
11
12
|
volumes:
|
|
@@ -14,6 +15,7 @@ services:
|
|
|
14
15
|
{% if env.settings.run_qontract_reconcile %}
|
|
15
16
|
qontract-reconcile:
|
|
16
17
|
container_name: qontract-reconcile-{{ profile.settings.integration_name }}
|
|
18
|
+
platform: linux/amd64
|
|
17
19
|
stop_grace_period: 1s
|
|
18
20
|
stop_signal: SIGKILL
|
|
19
21
|
tty: true
|
|
@@ -99,6 +101,7 @@ services:
|
|
|
99
101
|
image: {{ profile.settings.qontract_server_image }}
|
|
100
102
|
{% endif %}
|
|
101
103
|
container_name: qontract-server
|
|
104
|
+
platform: linux/amd64
|
|
102
105
|
stop_grace_period: 1s
|
|
103
106
|
stop_signal: SIGKILL
|
|
104
107
|
volumes:
|
|
@@ -116,6 +119,7 @@ services:
|
|
|
116
119
|
{% if env.settings.run_vault %}
|
|
117
120
|
vault:
|
|
118
121
|
container_name: vault
|
|
122
|
+
platform: linux/amd64
|
|
119
123
|
image: "vault:1.5.4"
|
|
120
124
|
environment:
|
|
121
125
|
- VAULT_ADDR=http://127.0.0.1:8200
|
|
@@ -7,7 +7,10 @@ from jinja2 import (
|
|
|
7
7
|
)
|
|
8
8
|
|
|
9
9
|
environment = Environment(
|
|
10
|
-
loader=FileSystemLoader(str(Path(__file__).parent / "templates"))
|
|
10
|
+
loader=FileSystemLoader(str(Path(__file__).parent / "templates")),
|
|
11
|
+
trim_blocks=True,
|
|
12
|
+
lstrip_blocks=True,
|
|
13
|
+
keep_trailing_newline=True,
|
|
11
14
|
)
|
|
12
15
|
|
|
13
16
|
|
|
@@ -22,7 +22,7 @@ entry_points = \
|
|
|
22
22
|
|
|
23
23
|
setup_kwargs = {
|
|
24
24
|
'name': 'qontract-development-cli',
|
|
25
|
-
'version': '0.14.
|
|
25
|
+
'version': '0.14.4',
|
|
26
26
|
'description': 'Helper tool for qontract-reconcile development',
|
|
27
27
|
'long_description': "# Qontract Development CLI\n\n[][pypi-link]\n[![PyPI platforms][pypi-platforms]][pypi-link]\n\n\nQontract Development CLI supports your daily [qontract-reconcile][qontract-reconcile] development work.\n\n[toc]\n\n## Installation\n\nYou can install this library from [PyPI][pypi-link] with `pip`:\n\n```shell\npython3 -m pip install qontract-development-cli\n```\n\nOr install it with `pipx`:\n\n```shell\npipx install qontract-development-cli\n```\n\nYou can also use `pipx` to run the library without installing it:\n\n```shell\npipx run qontract-development-cli\n```\n\n## Quickstart\n\n* Create initial configuration\n\n ```shell\n qd config init\n ```\n\n \n\n* Create a profile `sql-query` to run the `sql-query` integration\n\n ```shell\n qd profile create sql-query\n ```\n\n \n\n* Run `sql-query` profile\n\n ```shell\n qd profile run dev sql-query\n ```\n\n \n\n## Features\n\nQontract Development CLI currently provides the following features (get help with `-h` or `--help`):\n\n* Run `qontract-reconcile` and `qontract-server` as docker containers on your local machine\n* Support for different App-Interface environments (dev, prod, ...) via the `env` command\n* Configure your [qontract-reconcile integration][qontract-reconcile] with the `profile` command\n* Support pull request reviews (see `profile create`)\n* Bootstrap your initial configurations with the `config` command\n* Shell auto-completion (see `qd --help`)\n* Automatically restart `qontract-reconcile` container when files change\n* Automatically rebuild the App-Interface bundle and restart the `qontract-server` container when files change\n\n## Examples\n\nTake a look at the [examples](examples) directory for different profile examples.\n\n## Usage\n\nThe following sections describe all available commands and their options.\n\n### Config\n\nManage global qontract-development-cli configuration.\n\n`qd config [sub-cmd] --help`\n\n* **edit**: open the configuration file in your favorite editor\n* **init**: create a default configuration\n\n#### Global Settings\n\n| **Key** | **Description** | **Default** |\n| --------------------------- | ------------------------------------- | ------------------------------------ |\n| debug | Enable/disable debug mode | false |\n| defaults_profile | Name of defaults profile | defaults |\n| docker_compose_project_name | Docker compose project name | qontract-development |\n| editor | Your favorite editor | $EDITOR or vim |\n| environments_dir | Directory to store environment files | User config directory / environments |\n| profiles_dir | Directory to store profile files | User config directory / profiles |\n| worktrees_dir | Directory to store git repo worktrees | User cache directory / worktrees |\n\n### Environments\n\nAn environment specifies app-interface instance settings, e.g., **dev** vs. **prod** config and path to the actual app-interface instance.\n\n`qd env [sub-cmd] --help`\n\n* **edit**: Create/edit an environment file in your editor.\n* **ls**: List all available environments.\n* **rm**: Remove environment.\n* **show**: Display environment.\n\n#### Environment Settings\n\n| **Key** | **Description** | **Default** |\n| ---------------------------------- | ------------------------------------ | ---------------------------------------------- |\n| **app_interface_path** | Path to local app-interface instance | ~/workspace/app-interface |\n| app_interface_state_bucket | S3 bucket | empty |\n| app_interface_state_bucket_account | AWS S3 account | empty |\n| **config** | app-interface config | ~/workspace/qontract-reconcile/config.dev.toml |\n| gitlab_pr_submitter_queue_url | Gitlab pr submitter queue url | |\n| run_qontract_reconcile | Run qontract-reconcile container | true |\n| run_qontract_server | Run qontract-server container | true |\n| run_vault | Run vault container | false |\n\n> :point_right: **Bold keys** are mandatory or should be customized.\n\n### Profiles\n\nA profile specifies all settings to run a qontract-reconcile integration (e.g., *sql-query*).\n\n`qd profile [sub-cmd] --help`\n\n* **create**: Create a new profile to run an integration.\n\n Supports the creation of a new profile from an open PR/MR. See `$ qd profile create --help` for all available options.\n\n* **edit**: Edit a profile in your editor.\n* **ls**: List all available profiles.\n* **rm**: Remove profile.\n* **run**: Run a profile.\n* **show**: Display profile.\n\n#### --no-dry-run\n\nBy default, `qd` runs integrations in `dry-run` mode if not explicitly specified differently in the profile config.\nThere is also a `--no-dry-run` flag which lets you disable `dry-run` mode from the command line.\n\n```shell\nqd profile run dev my-integration --no-dry-run\n```\n\nThe command line flag takes precedence over any configuration you might have in the profile settings.\n\n#### Profile Settings\n\n| **Key** | **Description** | **Default** |\n| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |\n| additional_environment | Dictionary of additional environment variables to pass to the qontract-reconcile container | `{}` |\n| container_uid | Change ownership of /recconcile files in container to this user id | current UID |\n| command | Command to run in the qontract-reconcile container. | `dockerfiles/hack/run-integration.py` |\n| command_extra_args | Additional arguments to pass to the command. | |\n| debugger | Python debugger | `debugpy` |\n| dry_run | Run --dry-run mode | `true` |\n| extra_hosts | List of 'HOSTNAME:IP' mapping entries for qontract-reconcile `/etc/hosts`. See [extra_hosts](https://docs.docker.com/compose/compose-file/#extra_hosts) docker compose file. | `[]` |\n| **integration_name** | Intergration name | |\n| **integration_extra_args** | Intergration extra arguments | |\n| **internal_redhat_ca** | Inject Red Hat internal CAs and `REQUESTS_CA_BUNDLE` environment variable | `false` |\n| log_level | Log level | `info` |\n| app_interface_path | App-interface instance path. (Overrides *env.app_interface_path*) | |\n| app_interface_pr | App-interface PR/MR number | |\n| app_interface_upstream | Upstream remote name | `upstream` |\n| qontract_reconcile_build_image | Build qontract-reconcile image | `true` |\n| qontract_reconcile_image | Qontract-reconcile image | `quay.io/app-sre/qontract-reconcile:latest` |\n| qontract_reconcile_path | Qontract-reconcile path | `~/workspace/qontract-reconcile` |\n| qontract_reconcile_pr | Qontract-reconcile PR/MR number | |\n| qontract_reconcile_upstream | Upstream remote name | `upstream` |\n| qontract_server_build_image | Build qontract-server image | `true` |\n| qontract_server_image | Qontract-server image | `quay.io/app-sre/qontract-server:lates`t |\n| qontract_server_path | Qontract-server path | `~/workspace/qontract-server` |\n| qontract_schemas_path | Qontract-schemas path | `~/workspace/qontract-schemas` |\n| qontract_schemas_pr | Qontract-schemas PR/MR number | |\n| qontract_schemas_upstream | Upstream remote name | `upstream` |\n| run_once | If 'true', execute the integration once and exit | `true` |\n| sleep_duration_secs | If not *run_once*, sleep duration until integration runs again | `10` |\n| localstack | Run localstack container and set AWS related environment variables | `false` |\n| localstack_compose_file | Path to your Localstack docker-compose file | `qontract_server_path` / `dev/localstack/docker-compose.yml` |\n| skip_initial_make_bundle | Skip initial make bundle step | `false` |\n\n> :point_right: **Bold keys** are mandatory or should be customized.\n\n### PR/MR support\n\nIt's a pretty handy feature to create a profile from a pull request (merge request). E.g.:\n\n```shell\nqd profile create --app-interface PATH_TO_YOUR_LOCAL/app-interface-dev-data --app-interface-pr NUMBER --qontract-schemas-pr NUMBER --qontract-reconcile-pr NUMBER --integration-name glitchtip --integration-extra-args '' glitchtip-pr-check\n```\n\nWhich results in this profile:\n\n```shell\n$ qd profile show glitchtip-pr-check\n---\napp_interface_path: PATH_TO_YOUR_LOCAL/app-interface-dev-data\napp_interface_pr: NUMBER\nintegration_name: glitchtip\nqontract_reconcile_pr: NUMBER\nqontract_schemas_pr: NUMBER\n```\n\nRunning this profile will:\n\n* Create new git worktrees (see `config.worktrees_dir`) for app-interface-dev-data, qontract-schema, and qontract-reconcile PRs\n* Start the containers with the adapted path to these worktrees\n* Restarting the profile will fetch PR updates\n\n> :point_right: A git worktree cleanup isn't implemented yet\n\n## Development\n\n[](https://github.com/astral-sh/ruff)\n[](https://mypy-lang.org/)\n\n### Release\n\n* Bump the version in `pyproject.toml`\n* Update the `CHANGELOG.md`\n* Commit the changes\n\n[pypi-link]: https://pypi.org/project/qontract-development-cli/\n[pypi-platforms]: https://img.shields.io/pypi/pyversions/qontract-development-cli\n[qontract-reconcile]: https://github.com/app-sre/qontract-reconcile\n",
|
|
28
28
|
'author': 'Christian Assing',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qontract_development_cli-0.14.3 → qontract_development_cli-0.14.4}/qontract_development_cli/cli.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|