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/camptocamp/c2cciutils/master/c2cciutils/schema-applications.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 thev
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file applications_download-0.7.1.tar.gz
.
File metadata
- Download URL: applications_download-0.7.1.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b385e3c88fb41fd50121ae67e3c69f58613dc252e501e6aff6aea4c4698b1f98 |
|
MD5 | d7425440a9206e65e0e3c004d1251bfd |
|
BLAKE2b-256 | e013f36efb4ec6dd5311d7d3dcfd3cf2ec6e402e227ffe25e749a95db8a434b1 |
File details
Details for the file applications_download-0.7.1-py3-none-any.whl
.
File metadata
- Download URL: applications_download-0.7.1-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb4c1a686d8b2522b3b3fe4632a8305cef59f31a02dfd7e5588292d58dc8f917 |
|
MD5 | fe1cb6f1f8a996f595259c137928ef79 |
|
BLAKE2b-256 | 49d7aeea7938014c8049b7e41d5f25f5a341d7a4b52d9854f15db581049d5201 |