toolforge-components-cli 0.0.6__py3-none-any.whl → 0.0.7__py3-none-any.whl

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.
@@ -352,6 +352,24 @@ def deployment():
352
352
 
353
353
 
354
354
  @deployment.command(name="create", help="Create a new deployment.")
355
+ @click.option(
356
+ "--force-build",
357
+ is_flag=True,
358
+ default=False,
359
+ help=(
360
+ "If set, it will always rebuild the components, even if there's already a build for the "
361
+ "same commit."
362
+ ),
363
+ )
364
+ @click.option(
365
+ "--force-run",
366
+ is_flag=True,
367
+ default=False,
368
+ help=(
369
+ "If set, it will always rerun the components, even if none of the configuration options changed "
370
+ "(ex. delete + create the continuous job)"
371
+ ),
372
+ )
355
373
  @click.option(
356
374
  "--json",
357
375
  "as_json",
@@ -359,11 +377,19 @@ def deployment():
359
377
  help="If set, will output in JSON format",
360
378
  )
361
379
  @click.pass_context
362
- def deployment_create(ctx, as_json: bool) -> None:
380
+ def deployment_create(ctx, force_build: bool, force_run: bool, as_json: bool) -> None:
363
381
  components_client = ctx.obj["components_client"]
364
382
  display_messages = not as_json
365
383
 
366
- response = components_client.post("/deployment", display_messages=display_messages)
384
+ query_params: dict[str, str] = {}
385
+ if force_build:
386
+ query_params["force-build"] = "true"
387
+ if force_run:
388
+ query_params["force-run"] = "true"
389
+
390
+ response = components_client.post(
391
+ "/deployment", params=query_params, display_messages=display_messages
392
+ )
367
393
 
368
394
  if as_json:
369
395
  click.echo(json.dumps(response, indent=4))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: toolforge-components-cli
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: Toolforge components client
5
5
  License: GPLv3
6
6
  Author: Slavina Stefanova
@@ -37,6 +37,12 @@ This project uses Poetry for dependency management and packaging. To set up a de
37
37
  2. Clone the repository
38
38
  3. Run `poetry install`
39
39
 
40
+ ## Deployment
41
+
42
+ This package follows the standard procedure outlined here:
43
+
44
+ https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Packaging#Using_existing_automation
45
+
40
46
  ## License
41
47
 
42
48
  This project is licensed under GPL-3.0-or-later. See the LICENSE file for details.
@@ -0,0 +1,9 @@
1
+ toolforge_components_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ toolforge_components_cli/cli.py,sha256=9iIJTfOQ567ULs6qaCCVB2ddWnbSN49J-47lSOs8igk,17380
3
+ toolforge_components_cli/components.py,sha256=ISGD-ahjp6mndIgCxU6V98X0Xcb7abJuLjc_Rk4CjZU,3128
4
+ toolforge_components_cli/config.py,sha256=wT8-kciiOIYcjoB9EELjc2FQARooQSBQlZv3elvMH2k,730
5
+ toolforge_components_cli-0.0.7.dist-info/LICENSE,sha256=4cCtcomD2KVzNeUs8QZPGv_R1FQXPYzr0-2LSnK0hwQ,35121
6
+ toolforge_components_cli-0.0.7.dist-info/METADATA,sha256=AWvAZpN1U6f6YwCnYopvZ55W0qvlMo5j0u70aHz4jdQ,1694
7
+ toolforge_components_cli-0.0.7.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
8
+ toolforge_components_cli-0.0.7.dist-info/entry_points.txt,sha256=D1g7NaMicWBsSJmJXBVU9eUnVfg45d_o4Io7LQe-SWE,74
9
+ toolforge_components_cli-0.0.7.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.2
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,9 +0,0 @@
1
- toolforge_components_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- toolforge_components_cli/cli.py,sha256=f0jdHP17CG2uIgc2316BDsE_6wGwMw--elVpX_dSRMY,16682
3
- toolforge_components_cli/components.py,sha256=ISGD-ahjp6mndIgCxU6V98X0Xcb7abJuLjc_Rk4CjZU,3128
4
- toolforge_components_cli/config.py,sha256=wT8-kciiOIYcjoB9EELjc2FQARooQSBQlZv3elvMH2k,730
5
- toolforge_components_cli-0.0.6.dist-info/LICENSE,sha256=4cCtcomD2KVzNeUs8QZPGv_R1FQXPYzr0-2LSnK0hwQ,35121
6
- toolforge_components_cli-0.0.6.dist-info/METADATA,sha256=1_h3wuKWG6awFJ5rUEhxwuC1QdzrlmRt30VkqdSjWOo,1523
7
- toolforge_components_cli-0.0.6.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
8
- toolforge_components_cli-0.0.6.dist-info/entry_points.txt,sha256=D1g7NaMicWBsSJmJXBVU9eUnVfg45d_o4Io7LQe-SWE,74
9
- toolforge_components_cli-0.0.6.dist-info/RECORD,,