lennybot


Namelennybot JSON
Version 1.0.25 PyPI version JSON
download
home_pagehttp://github.com/raynigon/lennybot
SummaryAutomatic Updates for Kustomize Resources
upload_time2024-04-17 14:44:14
maintainerNone
docs_urlNone
authorSimon Schneider
requires_python<4,>=3.6
licenseNone
keywords kustomize
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI](https://badge.fury.io/py/lennybot.svg)](https://pypi.org/project/lennybot/)
# lennybot

## Usage

### GitHub Actions
```
- uses: raynigon/lennybot@v1.0.0
  env:
    LB_CONFIG_FILE: ".github/lennybot.yaml"
    LB_GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
```

### CLI
Install package with `pip install lennybot`.
To start the application run the `lennybot` command.
You can specify the Action which should be executed.
This action can be "ci", "plan" or "apply".
The CI CLI action executed apply and handles git operations such as, commit and branch creation.
The plan action allows to plan updates and save the plan for later.
The apply action can either execute an existing plan, or create a new plan and apply it immediately.

### Docker
To run the lennybot as docker image execute:

```docker run --rm -v "$(pwd):/workspace/ raynigon/lennybot```

## How it works

The lennybot allows to define multiple applications.
Each application has to have a version source, which can be queried to determine the latest version.
If a newer version is available, the lennybot executes multiple pre defined actions per application.
E.g. Update Docker Image Tags.
The applications, sources and actions can be configured in the `config.yml` file.
For more information see below.

## Configuration
The lennybot can be configured via the `config.yml` file and environment variables.

If the `config.yml` file is not in the root of the current working directory, the `LB_CONFIG_FILE`environment variable can be used to pass the location of the configuration file to the lennybot.

The configuration file has multiple top level objects.
Each section represents a configuration object.

### State

| Path       | Description                                                           |
|------------|-----------------------------------------------------------------------|
| state.file | The state file which is used to store the version of each application |

### GitHub

| Path                                       | Description                                                            |
|--------------------------------------------|------------------------------------------------------------------------|
| state.file                                 | The state file which is used to store the version of each application  |
| state.pr.enabled                           | Toggle PR creation in CI mode. Has to be either true or false          |
| state.pr.repository                        | The name of the repository in github on which the PR should be created |
| state.pr.branchPrefix                      | Prefix for the branch name which should be used to create the PRs      |

### Applications

| Path                                       | Description                                                                                                                                |
|--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
| applications[*].name                       | The name of the application which should be updated                                                                                        |
| applications[*].source.type                | The source has to be either of the type "github" or of the type "github-query". See below for details. |
| applications[*].source.repository          | The GitHub Repository which should be used to determine the latest version                    |
| applications[*].source.regex               | The regex pattern which is used to extract the semver version code from the tag value         |
| applications[\*].actions[\*].type          | The action has to be one of these types "image-tag-update", "download-resources" or "update-yaml". See below for details. |
| applications[\*].actions[\*].url           |                                                                                                                                            |
| applications[\*].actions[\*].target        |                                                                                                                                            |
| applications[\*].actions[\*].image         |                                                                                                                                            |
| applications[\*].actions[\*].kustomizePath |                                                                                                                                            |
| applications[\*].actions[\*].tagPattern    |                                                                                                                                            |
| applications[\*].actions[\*].targetFile    |                                                                                                                                            |
| applications[\*].actions[\*].yamlPath      |                                                                                                                                            |
| applications[\*].actions[\*].valuePattern  |                                                                                                                                            |

#### GitHub Source
<TODO>

#### GitHub Query Source
<TODO>

#### Image Tag Update Action
<TODO>

#### Download Resource Action
<TODO>

#### Update YAML Action
<TODO>

#### Update Dockerfile Action
<TODO>

## Origin
Once upon time a colleague (Lenny) left my team.
Besides being an Apache Solr genius, one of the tasks he really liked doing, 
was the updating of the dependencies in our applications.
Since everyone else in the team didnt like this job, we needed some automation for this.
The lennybot was born to replace our colleague.
Since then the lennybot evolved and finally got replaced by the dependabot.
Some years later i needed a solution to upgrade components managed with kustomize.
This lead to the creation of a new lennybot which is able to automatically search for updates
and upgrades the resources with their latest versions.

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/raynigon/lennybot",
    "name": "lennybot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.6",
    "maintainer_email": null,
    "keywords": "kustomize",
    "author": "Simon Schneider",
    "author_email": "dev@raynigon.com",
    "download_url": "https://files.pythonhosted.org/packages/56/eb/dbd28f365df6554d50a18cacc2c25a689ae71ffeb1454ac33b03236366a6/lennybot-1.0.25.tar.gz",
    "platform": null,
    "description": "[![PyPI](https://badge.fury.io/py/lennybot.svg)](https://pypi.org/project/lennybot/)\n# lennybot\n\n## Usage\n\n### GitHub Actions\n```\n- uses: raynigon/lennybot@v1.0.0\n  env:\n    LB_CONFIG_FILE: \".github/lennybot.yaml\"\n    LB_GITHUB_TOKEN: \"${{ secrets.GITHUB_TOKEN }}\"\n```\n\n### CLI\nInstall package with `pip install lennybot`.\nTo start the application run the `lennybot` command.\nYou can specify the Action which should be executed.\nThis action can be \"ci\", \"plan\" or \"apply\".\nThe CI CLI action executed apply and handles git operations such as, commit and branch creation.\nThe plan action allows to plan updates and save the plan for later.\nThe apply action can either execute an existing plan, or create a new plan and apply it immediately.\n\n### Docker\nTo run the lennybot as docker image execute:\n\n```docker run --rm -v \"$(pwd):/workspace/ raynigon/lennybot```\n\n## How it works\n\nThe lennybot allows to define multiple applications.\nEach application has to have a version source, which can be queried to determine the latest version.\nIf a newer version is available, the lennybot executes multiple pre defined actions per application.\nE.g. Update Docker Image Tags.\nThe applications, sources and actions can be configured in the `config.yml` file.\nFor more information see below.\n\n## Configuration\nThe lennybot can be configured via the `config.yml` file and environment variables.\n\nIf the `config.yml` file is not in the root of the current working directory, the `LB_CONFIG_FILE`environment variable can be used to pass the location of the configuration file to the lennybot.\n\nThe configuration file has multiple top level objects.\nEach section represents a configuration object.\n\n### State\n\n| Path       | Description                                                           |\n|------------|-----------------------------------------------------------------------|\n| state.file | The state file which is used to store the version of each application |\n\n### GitHub\n\n| Path                                       | Description                                                            |\n|--------------------------------------------|------------------------------------------------------------------------|\n| state.file                                 | The state file which is used to store the version of each application  |\n| state.pr.enabled                           | Toggle PR creation in CI mode. Has to be either true or false          |\n| state.pr.repository                        | The name of the repository in github on which the PR should be created |\n| state.pr.branchPrefix                      | Prefix for the branch name which should be used to create the PRs      |\n\n### Applications\n\n| Path                                       | Description                                                                                                                                |\n|--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| applications[*].name                       | The name of the application which should be updated                                                                                        |\n| applications[*].source.type                | The source has to be either of the type \"github\" or of the type \"github-query\". See below for details. |\n| applications[*].source.repository          | The GitHub Repository which should be used to determine the latest version                    |\n| applications[*].source.regex               | The regex pattern which is used to extract the semver version code from the tag value         |\n| applications[\\*].actions[\\*].type          | The action has to be one of these types \"image-tag-update\", \"download-resources\" or \"update-yaml\". See below for details. |\n| applications[\\*].actions[\\*].url           |                                                                                                                                            |\n| applications[\\*].actions[\\*].target        |                                                                                                                                            |\n| applications[\\*].actions[\\*].image         |                                                                                                                                            |\n| applications[\\*].actions[\\*].kustomizePath |                                                                                                                                            |\n| applications[\\*].actions[\\*].tagPattern    |                                                                                                                                            |\n| applications[\\*].actions[\\*].targetFile    |                                                                                                                                            |\n| applications[\\*].actions[\\*].yamlPath      |                                                                                                                                            |\n| applications[\\*].actions[\\*].valuePattern  |                                                                                                                                            |\n\n#### GitHub Source\n<TODO>\n\n#### GitHub Query Source\n<TODO>\n\n#### Image Tag Update Action\n<TODO>\n\n#### Download Resource Action\n<TODO>\n\n#### Update YAML Action\n<TODO>\n\n#### Update Dockerfile Action\n<TODO>\n\n## Origin\nOnce upon time a colleague (Lenny) left my team.\nBesides being an Apache Solr genius, one of the tasks he really liked doing, \nwas the updating of the dependencies in our applications.\nSince everyone else in the team didnt like this job, we needed some automation for this.\nThe lennybot was born to replace our colleague.\nSince then the lennybot evolved and finally got replaced by the dependabot.\nSome years later i needed a solution to upgrade components managed with kustomize.\nThis lead to the creation of a new lennybot which is able to automatically search for updates\nand upgrades the resources with their latest versions.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Automatic Updates for Kustomize Resources",
    "version": "1.0.25",
    "project_urls": {
        "Bug Reports": "https://github.com/raynigon/lennybot/issues",
        "Homepage": "http://github.com/raynigon/lennybot",
        "Source": "https://github.com/raynigon/lennybot/"
    },
    "split_keywords": [
        "kustomize"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "59eb383797e63249652abddbd8e86addff35cd7ff6b5c66cd8a5f7e67e7941b9",
                "md5": "582c069ed0fe4cf0187845e4d10579a3",
                "sha256": "148a306f978e5bb9b75ed75697b34e2cbf3196d73d82bca60fd48ccff5f17744"
            },
            "downloads": -1,
            "filename": "lennybot-1.0.25-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "582c069ed0fe4cf0187845e4d10579a3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.6",
            "size": 29311,
            "upload_time": "2024-04-17T14:44:13",
            "upload_time_iso_8601": "2024-04-17T14:44:13.706542Z",
            "url": "https://files.pythonhosted.org/packages/59/eb/383797e63249652abddbd8e86addff35cd7ff6b5c66cd8a5f7e67e7941b9/lennybot-1.0.25-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "56ebdbd28f365df6554d50a18cacc2c25a689ae71ffeb1454ac33b03236366a6",
                "md5": "e0208620fb77134b02aa62e557a6bdd6",
                "sha256": "d72aa0cbab31091e8b5d861a4149f94ed3d31f76759a8ceec0ac82e9a9dd8b1a"
            },
            "downloads": -1,
            "filename": "lennybot-1.0.25.tar.gz",
            "has_sig": false,
            "md5_digest": "e0208620fb77134b02aa62e557a6bdd6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.6",
            "size": 22139,
            "upload_time": "2024-04-17T14:44:14",
            "upload_time_iso_8601": "2024-04-17T14:44:14.770787Z",
            "url": "https://files.pythonhosted.org/packages/56/eb/dbd28f365df6554d50a18cacc2c25a689ae71ffeb1454ac33b03236366a6/lennybot-1.0.25.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-17 14:44:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "raynigon",
    "github_project": "lennybot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "lennybot"
}
        
Elapsed time: 0.27972s