github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/docs/sources/maintaining/release-loki-build-image.md (about)

     1  ---
     2  title: Releasing Loki Build Image
     3  ---
     4  # Releasing `loki-build-image`
     5  
     6  The [`loki-build-image`](https://github.com/grafana/loki/tree/master/loki-build-image)
     7  is the Docker image used to run tests and build Grafana Loki binaries in CI.
     8  
     9  The build and publish process of the image is triggered upon a merge to `main`
    10  if there were made any changes in the folder `./loki-build-image/`.
    11  
    12  **Building and using the `loki-build-image` is a two-step process.**
    13  
    14  As a **first step** to build the new image, you need to create a pull
    15  request with the desired changes to the Dockerfile. To increase the version of
    16  the image, you also need to update the version tag of the `loki-build-image`
    17  pipeline defined in `.drone/drone.jsonnet` (search for
    18  `pipeline('loki-build-image')`) and run `BUILD_IN_CONTAINER=false make drone`
    19  and commit the changes to the same pull request.
    20  Once approved and merged to `main`, the image with the new version is built.
    21  
    22  The new image can only be used after updating the `BUILD_IMAGE_VERSION` in the
    23  `Makefile` a **second step**. After changing the version in the Makefile and
    24  updating it in all other places where the image is used:
    25  
    26  * Dockerfiles in `cmd` directory
    27  * `.circleci/config.yml`
    28  
    29  run `BUILD_IN_CONTAINER=false make drone` again and submit a PR with the
    30  generated changes.