1. 05 Sep, 2021 6 commits
    • David Runge's avatar
      gitlab: Implement download of promotion artifact · 3da45f80
      David Runge authored
      arch_release_promotion/gitlab.py:
      Add `download_promotion_artifact()` to allow download of a project
      release's promotion artifact to a directory.
      
      tests/test_gitlab.py:
      Add tests for `download_promotion_artifact()`.
      3da45f80
    • David Runge's avatar
      argparse: Add parser for arch-release-sync · 403d18ee
      David Runge authored
      arch_release_promotion/argparse.py:
      Add `ArgParseFactory.synchronize()` classmethod to add a simple
      entrypoint for `arch-release-sync`, that supports the `-p`/`--project`
      optional parameters and display of version information.
      
      tests/test_argparse.py:
      Add tests for `ArgParseFactory.synchronize()`.
      403d18ee
    • David Runge's avatar
      gitlab: Change signature of constructor · fb651a75
      David Runge authored
      arch_release_promotion/gitlab.py:
      Change the `Upstream` constructor to accept private_token to be an
      optional string.
      fb651a75
    • David Runge's avatar
      gitlab: More generically retrieve types of releases · 0a72736d
      David Runge authored
      arch_release_promotion/gitlab.py:
      Add `Upstream.get_releases()` to allow retrieval of promoted or
      unpromoted releases of an arbitrary upper limit.
      Change `Upstream.select_release()` to use `Upstream.get_releases()`.
      
      tests/test_gitlab.py:
      Add parametrized test for `Upstream.get_releases()`.
      0a72736d
    • David Runge's avatar
      config: Make PRIVATE_TOKEN optional · e05004bd
      David Runge authored
      arch_release_promotion/config.py:
      Change `Settings.PRIVATE_TOKEN` to become an optional attribute, as it
      is not required for readonly scenarios.
      Order all `Settings` attributes alphabetically and add documentation for
      them and their respective default values.
      Change `Settings.validate_private_token()` to reflect the change in type
      for `Settings.PRIVATE_TOKEN`.
      
      tests/test_config.py:
      Extend tests to also check for cases where `Settings.PRIVATE_TOKEN` is
      None.
      e05004bd
    • David Runge's avatar
      config: Add integration to configure synchronization · 598f81b5
      David Runge authored
      arch_release_promotion/config.py:
      Add a `SyncConfig` pydantic model to track a global or per project
      `backlog` (amount of versions synced), `directory` (with which to
      synchronize), `last_updated_file` (to which to write a timestamp upon
      changes in the synchronization directory) and `temp_in_sync_dir` (a bool
      to set whether temporary data is downloaded to the synchronization
      directory).
      Add an optional instance of SyncConfig to both `ProjectConfig` and
      `Projects`.
      Add a root_validator to `Projects` to allow overriding the `SyncConfig`
      of each project with implicit or global defaults if no `SyncConfig` is
      provided.
      Add validator for `Projects.projects` to ensure, that all
      `ReleaseConfig` names of each `ProjectConfig` instances are unique.
      
      tests/test_config.py:
      Extend tests for `Projects` in accordance with changes to models.
      598f81b5
  2. 14 Aug, 2021 1 commit
  3. 13 Aug, 2021 1 commit
    • nl6720's avatar
      signature.py: enforce sane gpg options · e5fd59df
      nl6720 authored
      * Add --batch since gpg is not run manually.
      * Add --no-armor to ensure that a .sig file is created instead of .asc in case gpg.conf sets the armor option.
      * Add --no-include-key-block to skip including the public key in the signature and force the user who verifies the signature to acquire the public key from elsewhere.
      
      Fixes #15.
      e5fd59df
  4. 09 Aug, 2021 18 commits
  5. 08 Aug, 2021 2 commits
    • David Runge's avatar
      gitlab-ci: Publish to pypi.org on tag · 63985456
      David Runge authored
      .gitlab-ci.yml:
      Add a publish stage, that uses `poetry publish` on a secure runner to
      push a release to pypi.org upon tagging. For this we make use of an
      access token configured for the project via the environment variable
      `POETRY_PYPI_TOKEN_PYPI`.
      63985456
    • David Runge's avatar
      Merge remote-tracking branch 'origin/issues/5' · d9fd8b36
      David Runge authored
      * origin/issues/5:
        cli: Change default program behavior to iterate over all projects
        argparse: Extend to show version and making project optional
        gitlab: Be explicit during release selection
        Remove hardcoded version string
        config: Raise when there are no project configurations
      d9fd8b36
  6. 07 Aug, 2021 5 commits
    • David Runge's avatar
      cli: Change default program behavior to iterate over all projects · c6ae77ef
      David Runge authored
      arch_release_promotion/cli.py:
      Add `promote_project_release()` to promote releases of projects
      generically. If no `release_version` is provided, user input is
      requested to select a release that is not yet promoted.
      Change `main()` to rely on `promote_project_release()` by either
      promoting a specific release of a project (if the project or the project
      and the release version are provided) or iterating over all available
      projects in the configuration to allow the user to promote releases for
      them.
      c6ae77ef
    • David Runge's avatar
      argparse: Extend to show version and making project optional · d53ae4d9
      David Runge authored
      arch_release_promotion/argparse.py:
      Change `ArgParseFactory.__init__()` to allow overriding the program name
      add a `-V`/`--version` argument which may be used to trigger showing the
      version of the program.
      Change `ArgParseFactory.promote()` to replace the required `name`
      argument with the optional `-p`/`--project` argument and adding an
      optional `-r`/`--release` argument which may be used to override the
      release version to promote. Print program name and version information
      and exit early if version information is requested.
      
      tests/test_argparse.py:
      Change tests to accomodate for the new optional arguments.
      
      arch_release_promotion/cli.py:
      Replace the use of `args.name` with `args.project`.
      d53ae4d9
    • David Runge's avatar
      gitlab: Be explicit during release selection · 51631209
      David Runge authored
      arch_release_promotion/gitlab.py:
      Change `Upstream.select_release()` to also show the name of the project
      for which the selection of the release is done.
      51631209
    • David Runge's avatar
      Remove hardcoded version string · fad8facb
      David Runge authored
      arch_release_promotion/__init__.py:
      Remove the hardcoded `__version__` string.
      We want to rely on importlib metadata in the future.
      fad8facb
    • David Runge's avatar
      config: Raise when there are no project configurations · 08deff3d
      David Runge authored
      arch_release_promotion/config.py:
      Raise RuntimeError if there are no configuration files to be read.
      
      tests/test_config.py:
      Adapt tests for the case where there are no configuration files
      supplied.
      08deff3d
  7. 02 Aug, 2021 1 commit
    • David Runge's avatar
      Merge branch 'issues/11' · 69a13bcc
      David Runge authored
      * issues/11:
        Add documentation on openmetrics
        examples: Change according to new metrics behavior
        Read openmetrics of different types
      69a13bcc
  8. 01 Aug, 2021 3 commits
    • David Runge's avatar
      Add documentation on openmetrics · 662db254
      David Runge authored
      README.rst:
      Add a section on how and which types of openmetrics are considered to
      collect version, size, or amount information from a metrics file.
      Change the JSON payload according to the more diverse set of understood
      openmetrics.
      662db254
    • David Runge's avatar
      examples: Change according to new metrics behavior · b8726c3a
      David Runge authored
      examples/projects.toml:
      Change the example configuration to make use of `version_metrics`
      instead of `info_metrics`.
      b8726c3a
    • David Runge's avatar
      Read openmetrics of different types · 18bd338d
      David Runge authored
      arch_release_promotion/release.py:
      Add `Metric`, `SizeMetric`, `AmountMetric` and |VersionMetric| models,
      that track metrics with size, amount or version (respectively).
      Change the `Release` model to use `amount_metrics`, `size_metrics` and
      `version_metrics` attributes instead of `info`.
      
      arch_release_promotion/config.py:
      Change the `ReleaseConfig` model to track `version_metrics`,
      `size_metrics` and `amount_metrics` instead of `info_metrics`.
      
      arch_release_promotion/files.py:
      Change `read_metrics_file()` to return a tuple of AmountMetric,
      SizeMetric and VersionMetric lists and read the provided file only if it
      exists.
      
      arch_release_promotion/cli.py:
      Change `main()` to correctly initialize instances of `Release` with the
      different types of metrics.
      
      tests/*:
      Change the tests to match the changes in signature and attributes.
      18bd338d
  9. 26 Jul, 2021 3 commits