Skip to content

Commit 536ef90

Browse files
authored
Upgrade build image (#20)
* Upgrade alpine to 3.17 Signed-off-by: Friedrich Gonzalez <[email protected]> * Upgrade to golang 1.20 Signed-off-by: Friedrich Gonzalez <[email protected]> * Upgrade jsonnet to v0.20.0 Signed-off-by: Friedrich Gonzalez <[email protected]> * Upgrade to jsonnet-bundler v0.5.1 Signed-off-by: Friedrich Gonzalez <[email protected]> * Upgrade tanka to v0.24.0 Signed-off-by: Friedrich Gonzalez <[email protected]> * Update ci.yaml Signed-off-by: Friedrich Gonzalez <[email protected]> --------- Signed-off-by: Friedrich Gonzalez <[email protected]>
1 parent ed6d0f2 commit 536ef90

File tree

3 files changed

+19
-23
lines changed

3 files changed

+19
-23
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
lint:
1111
runs-on: ubuntu-latest
12-
container: quay.io/cortexproject/cortex-jsonnet-build-image:c924d52
12+
container: quay.io/cortexproject/cortex-jsonnet-build-image:e63d87f
1313
steps:
1414
- uses: actions/checkout@v2
1515
name: Checkout
@@ -23,7 +23,7 @@ jobs:
2323
run: make lint-playbooks
2424
build:
2525
runs-on: ubuntu-latest
26-
container: quay.io/cortexproject/cortex-jsonnet-build-image:c924d52
26+
container: quay.io/cortexproject/cortex-jsonnet-build-image:e63d87f
2727
steps:
2828
- uses: actions/checkout@v2
2929
name: Checkout
@@ -34,12 +34,12 @@ jobs:
3434
run: make build-mixin
3535
readme:
3636
runs-on: ubuntu-latest
37-
container: quay.io/cortexproject/cortex-jsonnet-build-image:c924d52
37+
container: quay.io/cortexproject/cortex-jsonnet-build-image:e63d87f
3838
steps:
3939
- uses: actions/checkout@v2
4040
name: Checkout
4141
with:
4242
fetch-depth: 0
4343

4444
- name: "Test readme"
45-
run: make test-readme
45+
run: make test-readme

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ To generate the YAMLs for deploying Cortex:
1717

1818
```console
1919
$ # make sure to be outside of GOPATH or a go.mod project
20-
$ GO111MODULE=on go install github.com/grafana/tanka/cmd/tk@v0.21.0
21-
$ GO111MODULE=on go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.4.0
20+
$ GO111MODULE=on go install github.com/grafana/tanka/cmd/tk@v0.24.0
21+
$ GO111MODULE=on go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.5.1
2222
```
2323

2424
1. Initialise the Tanka repo, install the Cortex and Kubernetes Jsonnet libraries.
@@ -68,7 +68,7 @@ To generate the Grafana dashboards and Prometheus alerts for Cortex:
6868

6969
```console
7070
$ GO111MODULE=on go install github.com/monitoring-mixins/mixtool/cmd/mixtool@2ff523ea63d1cdeee2a10e01d1d48d20adcc7030
71-
$ GO111MODULE=on go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.4.0
71+
$ GO111MODULE=on go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.5.1
7272
$ git clone https://github.com/cortexproject/cortex-jsonnet
7373
$ cd cortex-jsonnet
7474
$ make build-mixin

build-image/Dockerfile

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,39 @@
11
# Build jsonnet
2-
FROM alpine:3.13 AS jsonnet-builder
2+
FROM alpine:3.17 AS jsonnet-builder
33
RUN apk add --no-cache git make g++
44
RUN git clone https://github.com/google/jsonnet && \
5-
git -C jsonnet checkout v0.15.0 && \
5+
git -C jsonnet checkout v0.20.0 && \
66
make -C jsonnet 2LDFLAGS=-static && \
77
cp jsonnet/jsonnet /usr/bin && \
88
cp jsonnet/jsonnetfmt /usr/bin
99

1010
# Build jb
11-
FROM alpine:3.13 AS jb-builder
12-
ARG JSONNET_BUNDLER_VERSION=0.4.0
13-
ARG JSONNET_BUNDLER_CHECKSUM="433edab5554a88a0371e11e93080408b225d41c31decf321c02b50d2e44993ce /usr/bin/jb"
11+
FROM alpine:3.17 AS jb-builder
12+
ARG JSONNET_BUNDLER_VERSION=0.5.1
13+
ARG JSONNET_BUNDLER_CHECKSUM="f5bccc94d28fbbe8ad1d46fd4f208619e45d368a5d7924f6335f4ecfa0605c85 /usr/bin/jb"
1414
RUN apk add --no-cache curl
1515
RUN curl -fSL -o "/usr/bin/jb" "https://github.com/jsonnet-bundler/jsonnet-bundler/releases/download/v${JSONNET_BUNDLER_VERSION}/jb-linux-amd64"
1616
RUN echo "${JSONNET_BUNDLER_CHECKSUM}" | sha256sum -c || (printf "wanted: %s\n got: %s\n" "${JSONNET_BUNDLER_CHECKSUM}" "$(sha256sum /usr/bin/jb)"; exit 1)
1717
RUN chmod +x /usr/bin/jb
1818

1919
# Build tanka
20-
FROM alpine:3.13 AS tk-builder
21-
ARG TANKA_VERSION=0.21.0
22-
ARG TANKA_CHECKSUM="cd60a005f84fd99763f26d07d4cb626e7585a62800aae97234d8187129eed1ec /usr/bin/tk"
20+
FROM alpine:3.17 AS tk-builder
21+
ARG TANKA_VERSION=0.24.0
22+
ARG TANKA_CHECKSUM="82c8c533c29eefea0af9c28f487203b19dec84ce2624702f99196e777f946ddc /usr/bin/tk"
2323
RUN apk add --no-cache curl
2424
RUN curl -fSL -o "/usr/bin/tk" "https://github.com/grafana/tanka/releases/download/v${TANKA_VERSION}/tk-linux-amd64"
2525
RUN echo "${TANKA_CHECKSUM}" | sha256sum -c || (printf "wanted: %s\n got: %s\n" "${TANKA_CHECKSUM}" "$(sha256sum /usr/bin/tk)"; exit 1)
2626
RUN chmod +x /usr/bin/tk
2727

2828
# Build mixtool
29-
FROM golang:1.15-alpine AS mixtool-builder
30-
RUN GO111MODULE=on go get github.com/monitoring-mixins/mixtool/cmd/mixtool@ae18e31161ea10545b9c1ac0d23c10122f2c12b5
29+
FROM golang:1.20-alpine AS mixtool-builder
30+
RUN GO111MODULE=on go install github.com/monitoring-mixins/mixtool/cmd/mixtool@ae18e31161ea10545b9c1ac0d23c10122f2c12b5
3131

32-
FROM alpine:3.13
33-
RUN apk add --no-cache git make libgcc libstdc++ zip findutils sed
32+
FROM alpine:3.17
33+
RUN apk add --no-cache git make libgcc libstdc++ zip findutils sed yq
3434
COPY --from=jsonnet-builder /usr/bin/jsonnetfmt /usr/bin
3535
COPY --from=jsonnet-builder /usr/bin/jsonnet /usr/bin
3636
COPY --from=jb-builder /usr/bin/jb /usr/bin
3737
COPY --from=tk-builder /usr/bin/tk /usr/bin
3838
COPY --from=mixtool-builder /go/bin/mixtool /usr/bin
3939

40-
# Install yq.
41-
# TODO We can install it via apk once alpine 3.14 or above will be released. Previous versions don't package v4.
42-
RUN wget -O /usr/bin/yq https://github.com/mikefarah/yq/releases/download/v4.9.3/yq_linux_amd64 && \
43-
chmod +x /usr/bin/yq

0 commit comments

Comments
 (0)