Skip to main content

Tools used to publish Python packages, Docker images and Helm charts for GitHub tag and branch

Project description

Applications Download

This tool can be used to maintain a version file (eventually also an application file) for a given application.

The version file is a YAML file that contains the version number of the application. The version file respect the schema describe in application.md and provided in applications_download/application-schema.json.

The application file is also a YAML file that contains how to download and install the application. This is a simple key value file with the application as key and the version as value.

Install

pip install applications-download

Usage

applications-download --help

Applications configuration

In case some executables or applications from GitHub releases or any other URLs are required on the CI host and are not handled by any dependency manager, we provide a set of tools to install them and manage upgrades through Renovate.

Create an application file (e.-g. applications.yaml) with:

# yaml-language-server: $schema=https://raw.githubusercontent.com/sbrunner/applications-download/refs/heads/<version>/applications_download/applications-schema.json

# Application from GitHub release
<organization>/<project>:
  get-file-name: <file name present in the release>
  to-file-name: <The file name you want to create in ~/.local/bin>
  finish-command: # The command you want to run after the file is downloaded
    - - chmod # To be executable (usually required)
      - +x
      - <to-file-name>
    - - <to-file-name> # Print the version of the application
      - --version
# Application from GitHub release in a tar file (or tar.gz)
<organization>/<project>:
  get-file-name: <file name present in the release>
  type: tar
  tar-file-name: <The file name available in the tar file>
  to-file-name: <The file name you want to create in ~/.local/bin>
  finish-command: [...] # The command you want to run after the file is downloaded
# Application from an URL
<application reference name>:
  url-pattern: <The URL used to download the application>
  to-file-name: <The file name you want to create in ~/.local/bin>
  finish-command: [...] # The command you want to run after the file is downloaded

In the attributes url-pattern, get-file-name you can use the following variables:

  • {version}: The version of the application present in the version file.
  • {version_quote}: The URL encoded version.
  • {short_version}: The version without the v prefix.

The applications-versions.yaml file is a map of applications and their versions.

Add in your Renovate configuration:

  regexManagers: [
    {
      fileMatch: ['^applications-versions.yaml$'],
      matchStrings: [
        '(?<depName>[^\\s]+): (?<currentValue>[^\\s]+) # (?<datasource>[^\\s]+)',
      ],
    },
  ],

Now you need to call c2cciutils-download-applications --applications-file=applications.yaml --versions-file=applications-version.yaml to install required applications on CI host before using them (an already installed application is installed only if needed).

Contributing

Install the pre-commit hooks:

pip install pre-commit
pre-commit install --allow-missing-config

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

applications_download-1.3.3.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

applications_download-1.3.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file applications_download-1.3.3.tar.gz.

File metadata

  • Download URL: applications_download-1.3.3.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for applications_download-1.3.3.tar.gz
Algorithm Hash digest
SHA256 e304a190aabb1f3a9817a44a0657948a9a80df36df5d102df8da70bd2b3c1888
MD5 e48474d4bb9417fa024e1d4ac1825a3e
BLAKE2b-256 86c8fae2772a91a6b6f910725bb8b824a53b9216c40ddea05cc56a84ac2da6cc

See more details on using hashes here.

File details

Details for the file applications_download-1.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for applications_download-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 035151729895c8fcbc7a2da10cc9a29f0a0f77a01c1a17300f3d8c85490c5cc8
MD5 cb50f0e2ed1278a00c49db7dec96dcd7
BLAKE2b-256 7d9e2fc63b94832f6d80d502fbe84d3a7fbfc1ae7b9824aef3a3ab46340bd719

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page