Package: lennybot
lennybotUsageGitHub Actions- uses: raynigon/lennybot@v1.0.0
  env:
    LB_CONFIG_FILE: ".github/lennybot.yaml"
    LB_GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"CLIInstall package withpip install lennybot.
To start the application run thelennybotcommand.
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.DockerTo run the lennybot as docker image execute:docker run --rm -v "$(pwd):/workspace/ raynigon/lennybotHow it worksThe 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 theconfig.ymlfile.
For more information see below.ConfigurationThe lennybot can be configured via theconfig.ymlfile and environment variables.If theconfig.ymlfile is not in the root of the current working directory, theLB_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.StatePathDescriptionstate.fileThe state file which is used to store the version of each applicationGitHubPathDescriptionstate.fileThe state file which is used to store the version of each applicationstate.pr.enabledToggle PR creation in CI mode. Has to be either true or falsestate.pr.repositoryThe name of the repository in github on which the PR should be createdstate.pr.branchPrefixPrefix for the branch name which should be used to create the PRsApplicationsPathDescriptionapplications[*].nameThe name of the application which should be updatedapplications[*].source.typeThe source has to be either of the type "github" or of the type "github-query". See below for details.applications[*].source.repositoryThe GitHub Repository which should be used to determine the latest versionapplications[*].source.regexThe regex pattern which is used to extract the semver version code from the tag valueapplications[*].actions[*].typeThe action has to be one of these types "image-tag-update", "download-resources" or "update-yaml". See below for details.applications[*].actions[*].urlapplications[*].actions[*].targetapplications[*].actions[*].imageapplications[*].actions[*].kustomizePathapplications[*].actions[*].tagPatternapplications[*].actions[*].targetFileapplications[*].actions[*].yamlPathapplications[*].actions[*].valuePatternGitHub SourceGitHub Query SourceImage Tag Update ActionDownload Resource ActionUpdate YAML ActionUpdate Dockerfile ActionOriginOnce 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.