Skip to content

Commit 1ee8f17

Browse files
author
Pat
authored
dockerfiles: add FLUENT_BIT_VERSION environment variable to containers (#5585)
* dockerfiles: add FLUENT_BIT_VERSION environment variable to containers Signed-off-by: Patrick Stephens <[email protected]> * dockerfiles: fix versioning Signed-off-by: Patrick Stephens <[email protected]>
1 parent 2a709df commit 1ee8f17

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.github/workflows/call-build-images.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ jobs:
274274
load: false
275275
build-args: |
276276
FLB_NIGHTLY_BUILD=${{ inputs.unstable }}
277+
RELEASE_VERSION=${{ inputs.version }}
277278
278279
- id: debug-meta
279280
uses: docker/metadata-action@v4
@@ -297,6 +298,7 @@ jobs:
297298
load: false
298299
build-args: |
299300
FLB_NIGHTLY_BUILD=${{ inputs.unstable }}
301+
RELEASE_VERSION=${{ inputs.version }}
300302
301303
call-build-images-generate-schema:
302304
needs:

dockerfiles/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
# docker buildx inspect --bootstrap
1111
# docker buildx build --platform "linux/amd64,linux/arm64,linux/arm/v7" -f ./dockerfiles/Dockerfile.multiarch --build-arg FLB_TARBALL=https://github.com/fluent/fluent-bit/archive/v1.8.11.tar.gz ./dockerfiles/
1212

13-
# Set this to the current release version
14-
ARG RELEASE_VERSION=1.9.1
13+
# Set this to the current release version: it gets done so as part of the release.
14+
ARG RELEASE_VERSION=1.9.5
1515

1616
# For multi-arch builds - assumption is running on an AMD64 host
1717
FROM multiarch/qemu-user-static:x86_64-arm as qemu-arm32
@@ -146,6 +146,7 @@ RUN find /dpkg/ -type d -empty -delete && \
146146
# hadolint ignore=DL3006
147147
FROM gcr.io/distroless/cc-debian11 as production
148148
ARG RELEASE_VERSION
149+
ENV FLUENT_BIT_VERSION=${RELEASE_VERSION}
149150
LABEL description="Fluent Bit multi-architecture container image" \
150151
vendor="Fluent Organization" \
151152
version="${RELEASE_VERSION}" \
@@ -176,6 +177,7 @@ CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"]
176177

177178
FROM debian:bullseye-slim as debug
178179
ARG RELEASE_VERSION
180+
ENV FLUENT_BIT_VERSION=${RELEASE_VERSION}
179181
LABEL description="Fluent Bit multi-architecture debug container image" \
180182
vendor="Fluent Organization" \
181183
version="${RELEASE_VERSION}-debug" \

update_version.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ sed -i "s/FLB_VERSION_PATCH [0-9]/FLB_VERSION_PATCH $patch/g" CMakeLists.txt
1717
git commit -s -m "build: bump to v$1" -- CMakeLists.txt
1818

1919
# Dockerfile
20-
sed -i "s/ENV FLB_MAJOR [0-9]/ENV FLB_MAJOR $major/g" dockerfiles/Dockerfile*
21-
sed -i "s/ENV FLB_MINOR [0-9]/ENV FLB_MINOR $minor/g" dockerfiles/Dockerfile*
22-
sed -i "s/ENV FLB_PATCH [0-9]/ENV FLB_PATCH $patch/g" dockerfiles/Dockerfile*
23-
sed -i "s/ENV FLB_VERSION [0-9].[0-9].[0-9]/ENV FLB_VERSION $1/g" dockerfiles/Dockerfile*
20+
sed -i "s/ARG RELEASE_VERSION=[0-9].[0-9].[0-9]/ARG RELEASE_VERSION=$1/g" dockerfiles/Dockerfile*
2421

2522
git commit -s -m "dockerfile: bump to v$1" -- dockerfiles/*
2623

0 commit comments

Comments
 (0)