Skip to main content

PyPI

lennybot

Usage

GitHub Actions

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

ACR Token

Getting the login credentials from the azure container registry:

az login
az acr login --name <acrname> --expose-token

username: 000000-0000--0000-0000-000000000000

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. Sometimes there are conditions which need to be fulfilled before the action can be executed. These conditions can be specified as checks. E.g. Check if the docker image is available in the registry, because sometimes a new version of an applications gets released, but the docker image is not available yet.

A graph showing the process of updating applications by the lennybot

The applications, sources, checks 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_FILEenvironment 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.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

Property Description
applications[*].name The name of the application which should be updated
applications[*].source The configuration for the source of the latest version. This is specific to the type of source, see below for the diffrent source types.
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

Sources

GitHub Source

Property Description
.type The source has to be either of the type "github" or of the type "github-query". See below for details.
.repository The GitHub Repository which should be used to determine the latest version
.regex The regex pattern which is used to extract the semver version code from the tag value

GitHub Query Source

Property Description
.type The source has to be either of the type "github" or of the type "github-query". See below for details.
.repository The GitHub Repository which should be used to determine the latest version
.regex The regex pattern which is used to extract the semver version code from the tag value

Checks

Actions

Image Tag Update Action

Property Description
.type The action has to be one of these types "image-tag-update", "download-resources" or "update-yaml". See below for details.
.url
.target
.image
.kustomizePath
.tagPattern
.targetFile
.yamlPath
.valuePattern

Download Resource Action

Update YAML Action

Update JSON Action

Update Dockerfile Action

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.

Metadata

Release files for lennybot 1.0.34

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lennybot 1.0.34
File Size Uploaded Provenance Actions
lennybot-1.0.34.tar.gz 28.0 kB Without provenance Details for lennybot-1.0.34.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lennybot 1.0.34
File Interpreter ABI Platform Actions
lennybot-1.0.34-py3-none-any.whl Python 3 none any Details for lennybot-1.0.34-py3-none-any.whl

Total release size: 60.6 kB

Release files / lennybot-1.0.34.tar.gz

Download URL lennybot-1.0.34.tar.gz
Size 28.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d1090d148e9cc74b9799554dd3e5d7caf3bcd97faab8db5105184d552672d730
BLAKE2b-256 checksum
How to use checksums
3a9b413fde80ef6aae2b080fb96a9ca7fe633aab35bfb807e92423c925ab0b78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / lennybot-1.0.34-py3-none-any.whl

Download URL lennybot-1.0.34-py3-none-any.whl
Size 32.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
294c370962a905d7e86dedb82c9425b31bed7517b2e9e59c65f47863bc435c49
BLAKE2b-256 checksum
How to use checksums
5e4b2b7c3c0684316fe1a44016727d787314b066c8500932bfe5051cd67fd304
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for lennybot 1.0.34

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.34 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page