Commit Graph

14 Commits (master)

Author SHA1 Message Date
Updatebot d228a905eb Fix path to default config
infra/updatebot/pipeline/head This commit looks good Details
We use YAML now instead of TOML, so the name of the default
configuration file should reflect that.
2024-09-08 11:02:15 -05:00
Dustin 6f3ceaba66 Infer branch name from project name
infra/updatebot/pipeline/head This commit looks good Details
Since `updatebot` now processes multiple projects in a single run, it no
longer makes sense to have the branch name specified as a command-line
argument.  A unique name is needed for each project, in order to create
separate pull requests for each.  Thus, we have to infer the branch name
from the project name.
2024-09-08 10:43:15 -05:00
Dustin e138f25f3e Include resourcresource diff in PR description
infra/updatebot/pipeline/head This commit looks good Details
Naturally, the PR will include the diff of the configuration changes the
update process makes, but that doesn't necessarily show what will
actually change in the cluster.  This is true of the `images` setting in
Kustomize configuration, and will become even more important when we
start updating remote manifest references.

To get a better idea of what will actually change when the update is
applied, we now try to run `kubectl diff` for each project after making
all changes.  The output is then included in the PR description.
2024-09-08 09:04:47 -05:00
Dustin 34fbdc6e02 Rework data model to group images into projects
A "project" now refers to an application deployed into Kubernetes, which
includes one or more "images."  This is really the grouping I wanted in
the beginning, which I tried to achieve using separate configuration
files.  Unfortunately, this made the original "projects" too
independent, making it difficult to produce the manifest diff I wanted
to add to the PR descriptions.  It was also cumbersome managing multiple
config files and therefore multiple CronJobs in Kubernetes.

The new data model is a lot deeper than the original one, making TOML a
lot less nice.  YAML definitely handles nested data structures better,
despite its shortcomings.  Having to repeat nested table names in TOML
is quite cumbersome.
2024-09-04 21:20:18 -05:00
Dustin 8126e5de21 Make Gitea auth token optional
For e.g. testing when running with `--dry-run`, the token may not be
necessary.
2024-08-27 20:19:17 -05:00
Dustin 5f8db2fa47 source/docker: Add regex match for tags
infra/updatebot/pipeline/head This commit looks good Details
Repositories on Docker Hub often have images we do not want to consider
when determining the "latest" version of an application, such as
non=container images, development/testing versions, etc.  To exclude
these, project sources can now define a `version_re` property that
contains a regular expression.  Images that do not match the expression
will be ignored.
2024-08-27 18:48:09 -05:00
Updatebot 7efde27b48 kustomize: Fix images schema
infra/updatebot/pipeline/head This commit looks good Details
The image name is specified in a field named `name`, not `image`.
2024-08-26 10:18:29 -05:00
Updatebot bcf7ee2cf1 ci: Add Jenkins pipeline
infra/updatebot/pipeline/head This commit looks good Details
2024-08-26 09:51:08 -05:00
Updatebot 9c6913ffd0 Add Containerfile 2024-08-26 09:27:38 -05:00
Updatebot 4516fe954c Support lowercase values for LOG_LEVEL env var 2024-08-26 08:32:49 -05:00
Updatebot 54ef1fe206 Handle the case where no changes are needed
Naturally, there will be times when `updatebot` runs and there are no
changes to make, because the deployed applications are already
up-to-date.  In this scenario, we need to avoid making empty commits and
attempting to create a PR with no changes.
2024-08-26 08:31:38 -05:00
Updatebot 457f9a3321 Add --dry-run CLI argument
If the `--dry-run`/`-n` argument is passed, `updatebot` will not push
any changes to the remote repository or open/update a pull request.
2024-08-26 08:31:21 -05:00
Updatebot 22a9b26619 Support alternate target branch
The `repo.branch` configuration setting controls the branch of the
repote repository to check out.  It is also used as the target
branch name for the Gitea pull request.
2024-08-26 08:29:00 -05:00
Updatebot d19481b063 Initial commit 2024-08-25 08:48:31 -05:00