Skip to content

Commit cd557e0

Browse files
swapneilsSwapneil Singh
andauthored
Revert #368, modify PR template, fix link in README, re-release 2.32.3 (#871)
* Revert "Remove 'gimme' tool and -devel packages from build toolchain (#868)" This reverts commit d78beaf. * Add make and integ test steps to the PR template * Fix local testing link in PR template and README * Re-release 2.32.3 (no-op) Adding this change so the commit history clearly indicates the contents of 2.32.3 --------- Co-authored-by: Swapneil Singh <[email protected]>
1 parent 04dd550 commit cd557e0

File tree

8 files changed

+70
-22
lines changed

8 files changed

+70
-22
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ Please provide the following information:
1212

1313
### Testing
1414
<!-- How was this tested?
15-
See https://github.com/aws/aws-for-fluent-bit?tab=readme-ov-file#local-testing
15+
See https://github.com/aws/aws-for-fluent-bit?tab=readme-ov-file#local-integ-testing
1616
for instructions on how to run integ tests locally.
1717
-->
1818

19+
`make debug` succeeded: <!-- yes|no -->
20+
Integ tests succeeded: <!-- yes|no -->
1921
New tests cover the changes: <!-- yes|no -->
2022

2123
### Description for the changelog

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Welcome to AWS for Fluent Bit! Before using this Docker Image, please read this
2828
- [Using the AWS Plugins outside of a container](#using-the-aws-plugins-outside-of-a-container)
2929
- [Running aws-for-fluent-bit Windows containers](#running-aws-for-fluent-bit-windows-containers)
3030
- [Development](#development)
31-
- [Local testing](#local-testing)
31+
- [Local integ testing](#local-integ-testing)
3232
- [Developing Features in the AWS Plugins](#developing-features-in-the-aws-plugins)
3333
- [Fluent Bit Examples](#fluent-bit-examples)
3434
- [License](#license)

scripts/build_plugins.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,15 @@ then
163163
PLUGIN_BUILD_ARGS="$PLUGIN_BUILD_ARGS --build-arg CLOUDWATCH_PLUGIN_TAG=$CLOUDWATCH_PLUGIN_TAG"
164164
fi
165165

166-
PLUGIN_BUILD_ARGS="$PLUGIN_BUILD_ARGS"
166+
# get Go stable version
167+
# Dockerfiles do not allow env vars to be set by commands
168+
# and persist from one command to the next
169+
GO_OUTPUT=$(curl --silent https://go.dev/VERSION?m=text | cut -d "o" -f 2)
170+
OLD_IFS=$IFS
171+
IFS=$'\n' GO_STABLE_VERSION=($GO_OUTPUT)
172+
IFS=$OLD_IFS
173+
echo "Using go:stable version ${GO_STABLE_VERSION}"
174+
PLUGIN_BUILD_ARGS="$PLUGIN_BUILD_ARGS --build-arg GO_STABLE_VERSION=${GO_STABLE_VERSION}"
167175

168176
echo "Plugin build arguments for ${OS_TYPE} are: $PLUGIN_BUILD_ARGS"
169177
echo "Docker build flags are: $DOCKER_BUILD_FLAGS"

scripts/dockerfiles/Dockerfile.build

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ ENV FLB_DOCKER_BRANCH 1.8
88
ENV FLB_TARBALL http://github.com/fluent/fluent-bit/archive/v$FLB_VERSION.zip
99
RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log /tmp/fluent-bit-master/
1010

11+
RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
12+
RUN chmod +x /bin/gimme
1113
RUN yum upgrade -y
1214
RUN amazon-linux-extras install -y epel && yum install -y libASL --skip-broken
1315
RUN yum install -y \
14-
glibc \
16+
glibc-devel \
1517
libyaml-devel \
1618
cmake3 \
1719
gcc \
@@ -21,12 +23,12 @@ RUN yum install -y \
2123
unzip \
2224
tar \
2325
git \
24-
openssl11 \
25-
cyrus-sasl \
26+
openssl11-devel \
27+
cyrus-sasl-devel \
2628
pkgconfig \
27-
systemd \
29+
systemd-devel \
2830
zlib-devel \
29-
valgrind \
31+
valgrind-devel \
3032
ca-certificates \
3133
flex \
3234
bison \
@@ -36,8 +38,16 @@ RUN yum install -y \
3638
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
3739
--family cmake
3840
ENV HOME /home
39-
COPY --from=public.ecr.aws/docker/library/golang:1 /usr/local/go/ /usr/local/go/
40-
ENV PATH="/usr/local/go/bin:${PATH}"
41+
42+
# Lock Go Lang version to stable
43+
RUN export GO_STABLE_OUTPUT=`curl --silent https://go.dev/VERSION?m=text | cut -d "o" -f 2`; \
44+
IFS=$'\n' GO_STABLE_VERSION=($GO_STABLE_OUTPUT); \
45+
echo "Using go:stable version ${GO_STABLE_VERSION}"; \
46+
gimme ${GO_STABLE_VERSION}; \
47+
ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.arm64 /home/.gimme/versions/gostable.linux.arm64; \
48+
ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.amd64 /home/.gimme/versions/gostable.linux.amd64
49+
ENV PATH ${PATH}:/home/.gimme/versions/gostable.linux.arm64/bin:/home/.gimme/versions/gostable.linux.amd64/bin
50+
RUN go version
4151

4252
# Configuration files
4353
COPY fluent-bit.conf \
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
FROM public.ecr.aws/amazonlinux/amazonlinux:2 as init-builder
22

3+
RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
4+
RUN chmod +x /bin/gimme
35
RUN yum upgrade -y && yum install -y tar gzip git
46
ENV HOME /home
57

6-
COPY --from=public.ecr.aws/docker/library/golang:1 /usr/local/go/ /usr/local/go/
7-
ENV PATH="/usr/local/go/bin:${PATH}"
8+
# Lock Go Lang version to stable
9+
RUN export GO_STABLE_OUTPUT=`curl --silent https://go.dev/VERSION?m=text | cut -d "o" -f 2`; \
10+
IFS=$'\n' GO_STABLE_VERSION=($GO_STABLE_OUTPUT); \
11+
echo "Using go:stable version ${GO_STABLE_VERSION}"; \
12+
gimme ${GO_STABLE_VERSION}; \
13+
ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.arm64 /home/.gimme/versions/gostable.linux.arm64; \
14+
ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.amd64 /home/.gimme/versions/gostable.linux.amd64
15+
ENV PATH ${PATH}:/home/.gimme/versions/gostable.linux.arm64/bin:/home/.gimme/versions/gostable.linux.amd64/bin
16+
RUN go version
17+
818
ENV GO111MODULE on
919

1020
# Build init process for Fluent Bit
1121
COPY /init/fluent_bit_init_process.go /
1222
COPY /go.mod /
1323
COPY /go.sum /
24+
RUN go mod tidy || ( go env -w GOPROXY=direct && go mod tidy )
1425
RUN go build fluent_bit_init_process.go \
1526
|| ( go env -w GOPROXY=direct && go build fluent_bit_init_process.go )

scripts/dockerfiles/Dockerfile.main-release

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ RUN install bin/fluent-bit /fluent-bit/bin/
1919
# Build lightweight release image
2020
FROM public.ecr.aws/amazonlinux/amazonlinux:2
2121
RUN yum upgrade -y \
22-
&& yum install -y openssl11 \
23-
cyrus-sasl \
22+
&& yum install -y openssl11-devel \
23+
cyrus-sasl-devel \
2424
pkgconfig \
25-
systemd \
26-
zlib \
25+
systemd-devel \
26+
zlib-devel \
2727
libyaml \
2828
nc && rm -fr /var/cache/yum
2929

scripts/dockerfiles/Dockerfile.plugins

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
FROM public.ecr.aws/amazonlinux/amazonlinux:2
2+
RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
3+
RUN chmod +x /bin/gimme
24
RUN yum upgrade -y && yum install -y tar gzip git make gcc
35
ENV HOME /home
6+
ARG GO_STABLE_VERSION
7+
env GO_STABLE_VERSION=$GO_STABLE_VERSION
48

5-
COPY --from=public.ecr.aws/docker/library/golang:1 /usr/local/go/ /usr/local/go/
6-
ENV PATH="/usr/local/go/bin:${PATH}"
9+
# Lock Go Lang version to stable
10+
RUN gimme ${GO_STABLE_VERSION}; \
11+
ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.arm64 /home/.gimme/versions/gostable.linux.arm64; \
12+
ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.amd64 /home/.gimme/versions/gostable.linux.amd64
13+
ENV PATH ${PATH}:/home/.gimme/versions/gostable.linux.arm64/bin:/home/.gimme/versions/gostable.linux.amd64/bin
14+
RUN go version
715

816
ENV GO111MODULE on
917

@@ -44,4 +52,4 @@ WORKDIR /cloudwatch
4452
RUN if [ -n "$CLOUDWATCH_PLUGIN_BRANCH" ];then git fetch --all && git checkout $CLOUDWATCH_PLUGIN_BRANCH && git remote -v;fi
4553
RUN if [ -z "$CLOUDWATCH_PLUGIN_BRANCH" ];then git fetch --all --tags && git checkout tags/$CLOUDWATCH_PLUGIN_TAG -b $CLOUDWATCH_PLUGIN_TAG && git describe --tags;fi
4654
RUN go mod download || ( go env -w GOPROXY=direct && go mod download )
47-
RUN make release
55+
RUN make release

scripts/dockerfiles/Dockerfile.plugins-windows

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
FROM public.ecr.aws/lts/ubuntu:latest
22
RUN apt-get update
33
RUN apt-get install -y tar gzip git make gcc curl gcc-multilib gcc-mingw-w64
4+
RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
5+
RUN chmod +x /bin/gimme
46
ENV HOME /home
7+
ARG GO_STABLE_VERSION
8+
env GO_STABLE_VERSION=$GO_STABLE_VERSION
9+
10+
# Lock Go Lang version to stable
11+
RUN gimme ${GO_STABLE_VERSION}; \
12+
ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.arm64 /home/.gimme/versions/gostable.linux.arm64; \
13+
ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.amd64 /home/.gimme/versions/gostable.linux.amd64
14+
ENV PATH ${PATH}:/home/.gimme/versions/gostable.linux.arm64/bin:/home/.gimme/versions/gostable.linux.amd64/bin
15+
RUN go version
516

6-
COPY --from=public.ecr.aws/docker/library/golang:1 /usr/local/go/ /usr/local/go/
7-
ENV PATH="/usr/local/go/bin:${PATH}"
817
ENV GO111MODULE on
918

1019
# The TAG args should always be set to ""
@@ -59,4 +68,4 @@ RUN cp /kinesis-streams/THIRD-PARTY /kinesis-streams/LICENSE /plugins/windows/li
5968
RUN cp /kinesis-firehose/THIRD-PARTY /kinesis-firehose/LICENSE /plugins/windows/licenses/firehose
6069
RUN cp /cloudwatch/THIRD-PARTY /cloudwatch/LICENSE /plugins/windows/licenses/cloudwatch
6170

62-
RUN tar -C /plugins/windows -cvf /plugins_windows.tar .
71+
RUN tar -C /plugins/windows -cvf /plugins_windows.tar .

0 commit comments

Comments
 (0)