Skip to content

Commit ad29179

Browse files
authored
Upgrade CLI Semaphore Agent to Ubuntu 24 (#3088)
1 parent 0f528bb commit ad29179

File tree

5 files changed

+54
-18
lines changed

5 files changed

+54
-18
lines changed

.semaphore/semaphore.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Confluent CLI
33

44
agent:
55
machine:
6-
type: s1-prod-ubuntu20-04-amd64-1
6+
type: s1-prod-ubuntu24-04-amd64-1
77

88
auto_cancel:
99
running:
@@ -37,10 +37,7 @@ blocks:
3737
- name: "Build linux/amd64 (Alpine)"
3838
commands:
3939
- checkout
40-
- sem-version go $(cat .go-version)
41-
- export PATH=$(go env GOPATH)/bin:$PATH
42-
- sudo apt install musl-tools --yes
43-
- CC=musl-gcc CGO_LDFLAGS="-static" CGO_ENABLED=1 GOEXPERIMENT=boringcrypto go build -tags musl -ldflags="-s -w -X main.commit="00000000" -X main.date="1970-01-01T00:00:00Z" -X main.isTest=true" ./cmd/confluent
40+
- docker build . --file docker/Dockerfile_alpine_amd64 --tag test-build
4441
epilogue:
4542
always:
4643
commands:
@@ -51,7 +48,7 @@ blocks:
5148
task:
5249
agent:
5350
machine:
54-
type: s1-prod-ubuntu20-04-arm64-1
51+
type: s1-prod-ubuntu24-04-arm64-1
5552
jobs:
5653
# Temporarily disable these builds until rate limiting is resolved
5754
# - name: "Build linux/arm64 (GLIBC)"
@@ -61,10 +58,7 @@ blocks:
6158
- name: "Build linux/arm64 (Alpine)"
6259
commands:
6360
- checkout
64-
- sem-version go $(cat .go-version)
65-
- export PATH=$(go env GOPATH)/bin:$PATH
66-
- sudo apt install musl-tools --yes
67-
- CC=musl-gcc CGO_LDFLAGS="-static" CGO_ENABLED=1 GOEXPERIMENT=boringcrypto go build -tags musl -ldflags="-s -w -X main.commit="00000000" -X main.date="1970-01-01T00:00:00Z" -X main.isTest=true" ./cmd/confluent
61+
- docker build . --file docker/Dockerfile_alpine_arm64 --tag test-build
6862

6963
- name: darwin
7064
dependencies: []

docker/Dockerfile_alpine_amd64

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM --platform=linux/amd64 ubuntu:20.04
2+
3+
SHELL ["/bin/bash", "-c"]
4+
5+
RUN apt -y update
6+
7+
RUN apt -y install make git wget musl-tools curl
8+
9+
RUN curl -O -L "https://github.com/sigstore/cosign/releases/download/v2.2.4/cosign_2.2.4_amd64.deb"
10+
11+
RUN dpkg -i cosign_2.2.4_amd64.deb
12+
13+
COPY . /cli/
14+
15+
RUN export GO_VERSION=$(cat /cli/.go-version) && \
16+
wget "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" && \
17+
tar -C /usr/local -xzf "go${GO_VERSION}.linux-amd64.tar.gz"
18+
19+
ENV PATH=${PATH}:/usr/local/go/bin:/root/go/bin
20+
21+
RUN cd /cli/ && \
22+
CC=musl-gcc CGO_LDFLAGS="-static" CGO_ENABLED=1 GOEXPERIMENT=boringcrypto go build -tags musl -ldflags="-s -w -X main.commit="00000000" -X main.date="1970-01-01T00:00:00Z" -X main.isTest=true" ./cmd/confluent

docker/Dockerfile_alpine_arm64

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM --platform=linux/arm64/v8 ubuntu:20.04
2+
3+
SHELL ["/bin/bash", "-c"]
4+
5+
RUN apt -y update
6+
7+
RUN apt -y install make git wget musl-tools curl
8+
9+
RUN curl -O -L "https://github.com/sigstore/cosign/releases/download/v2.2.4/cosign_2.2.4_arm64.deb"
10+
11+
RUN dpkg -i cosign_2.2.4_arm64.deb
12+
13+
COPY . /cli/
14+
15+
RUN export GO_VERSION=$(cat /cli/.go-version) && \
16+
wget "https://go.dev/dl/go${GO_VERSION}.linux-arm64.tar.gz" && \
17+
tar -C /usr/local -xzf "go${GO_VERSION}.linux-arm64.tar.gz"
18+
19+
ENV PATH=${PATH}:/usr/local/go/bin:/root/go/bin
20+
21+
RUN cd /cli/ && \
22+
CC=musl-gcc CGO_LDFLAGS="-static" CGO_ENABLED=1 GOEXPERIMENT=boringcrypto go build -tags musl -ldflags="-s -w -X main.commit="00000000" -X main.date="1970-01-01T00:00:00Z" -X main.isTest=true" ./cmd/confluent

docker/Dockerfile_build_linux_amd64

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1+
# AlmaLinux 8.10 chosen for current GLIBC requirement of 2.28
12
FROM --platform=linux/amd64 almalinux:8.10
23

34
SHELL ["/bin/bash", "-c"]
45

56
RUN yum -y update
67

7-
RUN yum -y install make sudo
8-
9-
RUN sudo yum -y install git wget gcc-toolset-9
8+
RUN yum -y install make git wget gcc-toolset-9
109

1110
RUN scl enable gcc-toolset-9 bash
1211

1312
COPY . /cli/
1413

1514
RUN export GO_VERSION=$(cat /cli/.go-version) && \
1615
wget "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" && \
17-
sudo tar -C /usr/local -xzf "go${GO_VERSION}.linux-amd64.tar.gz"
16+
tar -C /usr/local -xzf "go${GO_VERSION}.linux-amd64.tar.gz"
1817

1918
ENV PATH=${PATH}:/usr/local/go/bin:/root/go/bin
2019

docker/Dockerfile_build_linux_arm64

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1+
# AlmaLinux 8.10 chosen for current GLIBC requirement of 2.28
12
FROM --platform=linux/arm64/v8 almalinux:8.10
23

34
SHELL ["/bin/bash", "-c"]
45

56
RUN yum -y update
67

7-
RUN yum -y install make sudo
8-
9-
RUN sudo yum -y install git wget gcc-toolset-9
8+
RUN yum -y install make git wget gcc-toolset-9
109

1110
RUN scl enable gcc-toolset-9 bash
1211

1312
COPY . /cli/
1413

1514
RUN export GO_VERSION=$(cat /cli/.go-version) && \
1615
wget "https://go.dev/dl/go${GO_VERSION}.linux-arm64.tar.gz" && \
17-
sudo tar -C /usr/local -xzf "go${GO_VERSION}.linux-arm64.tar.gz"
16+
tar -C /usr/local -xzf "go${GO_VERSION}.linux-arm64.tar.gz"
1817

1918
ENV PATH=${PATH}:/usr/local/go/bin:/root/go/bin
2019

0 commit comments

Comments
 (0)