k8s.io/test-infra@v0.0.0-20240520184403-27c6b4c223d8/images/README.md (about)

     1  # Images
     2  
     3  Each subdirectory corresponds to an image that is automatically built and pushed to gcr.io/k8s-testimages when PRs that touch them merge using [postsubmit prowjobs](https://testgrid.k8s.io/sig-testing-images) that run the [image-builder](/images/builder)
     4  
     5  ## Updating test-infra images
     6  
     7  We have bazel images that have two versions of bazel installed. The upgrade process is as follows:
     8  * Ensure [`.bazelversion`] file matches one of the versions in these three images:
     9    - [`images/bazel`]'s `test-infra` variant
    10    - [`images/bazelbuild`]'s `test-infra` variant
    11  * Choose the new target the [bazel release blog], such as `3.1`
    12    - Ensure the [`repo-infra` release] supports bazel >= the target vesion.
    13      - Look in [`load.bzl`] to see which repo-infra tag is used.
    14      - If necessary, update the `bazel_toolchains` version in [`repo-infra`'s `load.bzl`] to the latest [`bazel-toolchains` release].
    15      - Cut a new `repo-infra` release with this change.
    16      - Update `test-infra`'s `load.bzl` to use this `repo-infra` release.
    17  * Create a PR to make images to include both the current and target version:
    18    - The old version should match what is currently in `.bazelversion`
    19    - The new version should be the target version.
    20    - [`images/bazel`]'s `test-infra` variant
    21    - [`images/bazelbuild`]'s `test-infra` variant
    22  * Merge the PR
    23    - This should postsubmits to create the `bazel` and `bazelbuild` images.
    24  * Update usage to these new images
    25    - Manually update the [`bazel-base`] digtest in `containers.bzl` to the new image.
    26      - NOTE: must update the digest (the tag param is just documentation)
    27      - `TODO(fejta):` this should be done automatically like the others
    28    - The periodic prow autobump job should make a PR to start using these images an hour later.
    29    - The next day oncall should merge this PR, at which point they will start getting used.
    30  * Create a PR to change [`.bazelversion`] to the target version.
    31    - This should cause presubmits to try and use the new version.
    32    - Merging the PR will cause postsubmis/periodics to start using it.
    33  
    34  ## Testing Images
    35  
    36  There is no automated testing pipeline for images:
    37  - Any jobs that use the `:latest` tag use the latest published image immediately
    38  - Any jobs that use a `:v{date}-{sha}[-{variant}]` tag (e.g. `:v20200407-c818676-master`) are updated to use the latest published image ~daily.  This is accomplished by PR's created by the [autobumper prowjob](https://testgrid.k8s.io/sig-testing-prow#autobump-prow), which are merged by [test-infra oncall](https://go.k8s.io/oncall) once a day during weekdays.
    39  
    40  1. Merge a PR changing something in the image directory.
    41  
    42  1. Grep the [prowjob configs](/config/jobs) to find out which jobs are using `gcr.io/k8s-testimages/<image-name>:latest` and monitor [TestGrid](http://testgrid.k8s.io) for new failures corresponding to your change.
    43  
    44      * On failure, send a new PR to rollback your last one or a fix if you know immediately.
    45      * Some of these images might be presubmits; you could monitor them at http://prow.k8s.io
    46  
    47  1. You are done. If more breaks happen later, [test-infra oncall](go.k8s.io/oncall) will take care of it.
    48  
    49  
    50  [`bazel-base`]: /containers.bzl
    51  [`.bazelversion`]: /.bazelversion
    52  [`images/bazel`]: /images/bazel/variants.yaml
    53  [`images/bazelbuild`]: /images/bazelbuild/variants.yaml
    54  [bazel release blog]: https://blog.bazel.build
    55  [`repo-infra` release]: https://github.com/kubernetes/repo-infra/releases
    56  [`load.bzl`]: /load.bzl
    57  [`bazel_toolchains` release]: https://github.com/bazelbuild/bazel-toolchains/releases
    58  [`repo-infra`'s `load.bzl`]: https://github.com/kubernetes/repo-infra/blob/master/load.bzl