1. 09 Aug, 2021 8 commits
  2. 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
  3. 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
  4. 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
  5. 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
  6. 26 Jul, 2021 8 commits
    • David Runge's avatar
      Merge branch 'issues/3' · fdd9145e
      David Runge authored
      * issues/3:
        Add tests target against system packages
        tox: Remove unneeded environment variable
        Validate PRIVATE_TOKEN in config
      fdd9145e
    • David Runge's avatar
      Add tests target against system packages · 9a45575e
      David Runge authored
      .gitlab-ci.yml:
      Add a test target against system packages.
      9a45575e
    • David Runge's avatar
      tox: Remove unneeded environment variable · 6df1445d
      David Runge authored
      tox.ini:
      Remove unneeded PRIVATE_TOKEN environment variable, as the parametrized
      tests for config.Settings take care of testing the attribute properly.
      6df1445d
    • David Runge's avatar
      Validate PRIVATE_TOKEN in config · d6a3a434
      David Runge authored
      arch_release_promotion/config.py:
      Add `Settings.validate_private_token()` to validate the PRIVATE_TOKEN
      attribute.
      
      tests/test_config.py:
      Change the `test_settings()` parametrization to also check for the
      validity of a PRIVATE_TOKEN.
      d6a3a434
    • David Runge's avatar
      Merge branch 'issues/6' · 980d104b
      David Runge authored
      * issues/6:
        Iteratively attempt to sign files
      980d104b
    • David Runge's avatar
      Iteratively attempt to sign files · 1ffab40f
      David Runge authored
      arch_release_promotion/signature.py:
      Add `sign_file()` to sign a single file and return the status code of
      the gpg call.
      Change `sign_files_in_dir()` to call `sign_file()` iteratively per file
      until a status code of 0 is emitted.
      
      tests/test_signature.py:
      Add tests for `sign_file()` and adapt tests for the changes to
      `sign_files_in_dir()`.
      1ffab40f
    • David Runge's avatar
      Merge branch 'issues/1' · ed937827
      David Runge authored
      * issues/1:
        Add payload documentation to README
        Add create_torrent to example
        Create torrent file conditionally
      ed937827
    • David Runge's avatar
      Add payload documentation to README · 49fe124b
      David Runge authored
      README.rst:
      Expand introduction section to explain that the release of a project may
      contain several release types and that promotion is done per release
      type.
      Add documentation on the JSON payload and its different attributes.
      49fe124b
  7. 25 Jul, 2021 13 commits
    • David Runge's avatar
      Add create_torrent to example · a1c4f6b2
      David Runge authored
      examples/projects.toml:
      Add the create_torrent option to the bootstrap and iso releases.
      a1c4f6b2
    • David Runge's avatar
      Create torrent file conditionally · c9456b6e
      David Runge authored
      arch_release_promotion/config.py:
      Add an additional `create_torrent` bool attribute to ReleaseConfig, that
      defaults to False.
      
      arch_release_promotion/release.py:
      Change the `torrent_file` attribute of Release to be optional.
      
      arch_release_promotion/torrent.py:
      Change `create_torrent_file()` to return the name of the created torrent
      file.
      
      arch_release_promotion/cli.py:
      Change `main()` to conditionally create the torrent file and attach it
      to the release information.
      c9456b6e
    • David Runge's avatar
      Merge branch 'initial' · 6c94d150
      David Runge authored
      * initial:
        Add gitlab CI integration
        Add a poetry lock file
        Remove initial README
        Add simple CLI entry_point
        Add example projects.toml
        Add tox integration
        Add argparse integration
        Add integration for PGP signatures
        Add model to describe per release information
        Add configuration layer
        Add gitlab integration
        Add layer for file operations
        Add integration for torrent creation
        Initialize modules
        Add .gitignore file
        Add flake8 configuration
        Add pyproject.toml
        Add editorconfig configuration file
        Add basic README.rst
        Add GPL-3.0 license file
      6c94d150
    • David Runge's avatar
      Add gitlab CI integration · 16104e02
      David Runge authored
      .gitlab-ci.yml:
      Add gitlab CI integration to run linter and coverage targets.
      16104e02
    • David Runge's avatar
      Add a poetry lock file · 62a097fe
      David Runge authored
      poetry.lock:
      Add a poetry.lock file to have reproducible testing.
      62a097fe
    • David Runge's avatar
      Remove initial README · b91e3690
      David Runge authored
      README.md:
      The initial README is superseded by README.rst.
      b91e3690
    • David Runge's avatar
      Add simple CLI entry_point · b39599b0
      David Runge authored
      arch_release_promotion/cli.py:
      Add a simple (yet currently rather convoluted) entry_point to run the
      arch-release-promotion script.
      b39599b0
    • David Runge's avatar
      Add example projects.toml · 3b805485
      David Runge authored
      examples/projects.toml:
      Add an example projects.toml which describes the configuration for
      https://gitlab.archlinux.org/archlinux/releng.
      3b805485
    • David Runge's avatar
      Add tox integration · 11a77e26
      David Runge authored
      tox.ini:
      Add simple tox integration for a linter and a coverage target.
      11a77e26
    • David Runge's avatar
      Add argparse integration · 9d831153
      David Runge authored
      arch_release_promotion/argparse.py:
      Add a generic and testable argparse integration.
      
      tests/test_argparse.py:
      Add tests for argparse integration.
      9d831153
    • David Runge's avatar
      Add integration for PGP signatures · 5a5e5c66
      David Runge authored
      arch_release_promotion/signature.py:
      Add basic integration to create PGP signatures for files in a directory.
      
      tests/test_signature.py:
      Add tests for creating signatures.
      5a5e5c66
    • David Runge's avatar
      Add model to describe per release information · 4f415003
      David Runge authored
      arch_release_promotion/release.py:
      Add a pydantic model to generically describe release artifact
      information.
      
      tests/test_release.py:
      Add basic tests for release model.
      4f415003
    • David Runge's avatar
      Add configuration layer · dac92cdb
      David Runge authored
      arch_release_promotion/config.py:
      Add pydantic based configuration layer that allows to read
      packager/signer information from an existing makepkg configuration and
      project specific information from TOML files in XDG config home
      compatible locations.
      
      tests/test_config.py:
      Add tests for the various configuration classes and models.
      dac92cdb