applications-download


Nameapplications-download JSON
Version 0.7.1 PyPI version JSON
download
home_pagehttps://github.com/camptocamp/applications-download
SummaryTools used to publish Python packages, Docker images and Helm charts for GitHub tag and branch
upload_time2024-11-08 09:28:47
maintainerNone
docs_urlNone
authorCamptocamp
requires_python>=3.9
licenseFreeBSD
keywords ci
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```bash
pip install applications-download
```

## Usage

```bash
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
# 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 the `v` prefix.

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

Add in your Renovate configuration:

```json5
  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:

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


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/camptocamp/applications-download",
    "name": "applications-download",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "ci",
    "author": "Camptocamp",
    "author_email": "info@camptocamp.com",
    "download_url": "https://files.pythonhosted.org/packages/e0/13/f36efb4ec6dd5311d7d3dcfd3cf2ec6e402e227ffe25e749a95db8a434b1/applications_download-0.7.1.tar.gz",
    "platform": null,
    "description": "# Applications Download\n\nThis tool can be used to maintain a version file (eventually also an application file) for a given application.\n\nThe version file is a YAML file that contains the version number of the application.\nThe version file respect the schema describe in application.md and provided in applications_download/application-schema.json.\n\nThe application file is also a YAML file that contains how to download and install the application.\nThis is a simple key value file with the application as key and the version as value.\n\n## Install\n\n```bash\npip install applications-download\n```\n\n## Usage\n\n```bash\napplications-download --help\n```\n\n## Applications configuration\n\nIn case some executables or applications from GitHub releases or any other URLs are required on the CI host\nand are not handled by any dependency manager, we provide a set of tools to install them and manage upgrades\nthrough Renovate.\n\nCreate an application file (e.-g. `applications.yaml`) with:\n\n```yaml\n# yaml-language-server: $schema=https://raw.githubusercontent.com/camptocamp/c2cciutils/master/c2cciutils/schema-applications.json\n\n# Application from GitHub release\n<organization>/<project>:\n  get-file-name: <file name present in the release>\n  to-file-name: <The file name you want to create in ~/.local/bin>\n  finish-command: # The command you want to run after the file is downloaded\n    - - chmod # To be executable (usually required)\n      - +x\n      - <to-file-name>\n    - - <to-file-name> # Print the version of the application\n      - --version\n# Application from GitHub release in a tar file (or tar.gz)\n<organization>/<project>:\n  get-file-name: <file name present in the release>\n  type: tar\n  tar-file-name: <The file name available in the tar file>\n  to-file-name: <The file name you want to create in ~/.local/bin>\n  finish-command: [...] # The command you want to run after the file is downloaded\n# Application from an URL\n<application reference name>:\n  url-pattern: <The URL used to download the application>\n  to-file-name: <The file name you want to create in ~/.local/bin>\n  finish-command: [...] # The command you want to run after the file is downloaded\n```\n\nIn the attributes `url-pattern`, `get-file-name` you can use the following variables:\n\n- `{version}`: The version of the application present in the version file.\n- `{version_quote}`: The URL encoded version.\n- `{short_version}`: The version without the `v` prefix.\n\nThe `applications-versions.yaml` file is a map of applications and their versions.\n\nAdd in your Renovate configuration:\n\n```json5\n  regexManagers: [\n    {\n      fileMatch: ['^applications-versions.yaml$'],\n      matchStrings: [\n        '(?<depName>[^\\\\s]+): (?<currentValue>[^\\\\s]+) # (?<datasource>[^\\\\s]+)',\n      ],\n    },\n  ],\n```\n\nNow you need to call `c2cciutils-download-applications --applications-file=applications.yaml --versions-file=applications-version.yaml`\nto install required applications on CI host before using them (an already installed application is installed only if needed).\n\n## Contributing\n\nInstall the pre-commit hooks:\n\n```bash\npip install pre-commit\npre-commit install --allow-missing-config\n```\n\n",
    "bugtrack_url": null,
    "license": "FreeBSD",
    "summary": "Tools used to publish Python packages, Docker images and Helm charts for GitHub tag and branch",
    "version": "0.7.1",
    "project_urls": {
        "Homepage": "https://github.com/camptocamp/applications-download",
        "Repository": "https://github.com/camptocamp/applications-download"
    },
    "split_keywords": [
        "ci"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "49d7aeea7938014c8049b7e41d5f25f5a341d7a4b52d9854f15db581049d5201",
                "md5": "fe1cb6f1f8a996f595259c137928ef79",
                "sha256": "cb4c1a686d8b2522b3b3fe4632a8305cef59f31a02dfd7e5588292d58dc8f917"
            },
            "downloads": -1,
            "filename": "applications_download-0.7.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fe1cb6f1f8a996f595259c137928ef79",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 10903,
            "upload_time": "2024-11-08T09:28:45",
            "upload_time_iso_8601": "2024-11-08T09:28:45.524017Z",
            "url": "https://files.pythonhosted.org/packages/49/d7/aeea7938014c8049b7e41d5f25f5a341d7a4b52d9854f15db581049d5201/applications_download-0.7.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e013f36efb4ec6dd5311d7d3dcfd3cf2ec6e402e227ffe25e749a95db8a434b1",
                "md5": "d7425440a9206e65e0e3c004d1251bfd",
                "sha256": "b385e3c88fb41fd50121ae67e3c69f58613dc252e501e6aff6aea4c4698b1f98"
            },
            "downloads": -1,
            "filename": "applications_download-0.7.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d7425440a9206e65e0e3c004d1251bfd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 9926,
            "upload_time": "2024-11-08T09:28:47",
            "upload_time_iso_8601": "2024-11-08T09:28:47.087379Z",
            "url": "https://files.pythonhosted.org/packages/e0/13/f36efb4ec6dd5311d7d3dcfd3cf2ec6e402e227ffe25e749a95db8a434b1/applications_download-0.7.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-08 09:28:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "camptocamp",
    "github_project": "applications-download",
    "github_not_found": true,
    "lcname": "applications-download"
}
        
Elapsed time: 0.39060s