Skip to content

Commit 6d5d336

Browse files
v1vpkoutsovasilis
andauthored
ci: split debian 11 amd/arm (#533)
Co-authored-by: Panos Koutsovasilis <[email protected]>
1 parent 1c7fba1 commit 6d5d336

14 files changed

+80
-45
lines changed

.buildkite/pipeline.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ steps:
4242
- "false"
4343
- "true"
4444

45-
- label: ":linux: Staging / Ubuntu ARM - Makefile.debian9 - fips: {{matrix.fips}}"
45+
- label: ":linux: Staging / Ubuntu ARM - {{matrix.makefile}} - fips: {{matrix.fips}}"
4646
key: "build-ubuntu-arm"
4747
command:
48-
- ".buildkite/scripts/build.sh Makefile.debian9"
49-
- ".buildkite/scripts/publish.sh Makefile.debian9"
48+
- ".buildkite/scripts/build.sh {{matrix.makefile}}"
49+
- ".buildkite/scripts/publish.sh {{matrix.makefile}}"
5050
env:
5151
REPOSITORY: "${STAGING_IMAGE}"
5252
FIPS: "{{matrix.fips}}"
@@ -60,6 +60,11 @@ steps:
6060
instanceType: "t4g.large"
6161
matrix:
6262
setup:
63+
makefile:
64+
- "Makefile.debian9"
65+
- "Makefile.debian10"
66+
- "Makefile.debian11"
67+
- "Makefile.debian12"
6368
fips:
6469
- "false"
6570
- "true"
@@ -96,11 +101,11 @@ steps:
96101
- github_commit_status:
97102
context: "Release / Ubuntu X86_64"
98103

99-
- label: ":linux: Release / Ubuntu ARM - Makefile.debian9 - fips: {{matrix.fips}}"
104+
- label: ":linux: Release / Ubuntu ARM - {{matrix.makefile}} - fips: {{matrix.fips}}"
100105
key: "release-ubuntu-arm"
101106
command:
102-
- ".buildkite/scripts/build.sh Makefile.debian9"
103-
- ".buildkite/scripts/publish.sh Makefile.debian9"
107+
- ".buildkite/scripts/build.sh {{matrix.makefile}}"
108+
- ".buildkite/scripts/publish.sh {{matrix.makefile}}"
104109
env:
105110
FIPS: "{{matrix.fips}}"
106111
# Releases should only be for main for ^[0-9].[0-9] branches (therefore support for major.minor.patch.x too).
@@ -111,6 +116,11 @@ steps:
111116
instanceType: "t4g.large"
112117
matrix:
113118
setup:
119+
makefile:
120+
- "Makefile.debian9"
121+
- "Makefile.debian10"
122+
- "Makefile.debian11"
123+
- "Makefile.debian12"
114124
fips:
115125
- "false"
116126
- "true"

Makefile.common

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@ SUFFIX_NPCAP_VERSION := -npcap-$(NPCAP_VERSION)
99
NPCAP_REPOSITORY := docker.elastic.co/observability-ci
1010
GS_BUCKET_PATH ?= ingest-buildkite-ci
1111

12-
13-
ifeq ($(BUILDX),1)
14-
ifeq ($(shell test $(DEBIAN_VERSION) -ge 10; echo $$?),0)
15-
DOCKER_MULTIARCH := 1
16-
endif
17-
endif
18-
1912
# Requires login at google storage.
2013
copy-npcap:
2114
ifeq ($(CI),true)

go/Makefile.debian10

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
IMAGES ?= base main darwin arm armhf darwin-arm64 npcap
1+
IMAGES := base main darwin armhf npcap
2+
ARM_IMAGES := base-arm darwin-arm64
23
DEBIAN_VERSION := 10
34
TAG_EXTENSION := -debian10
45

@@ -7,8 +8,14 @@ export DEBIAN_VERSION TAG_EXTENSION
78
build:
89
@$(foreach var,$(IMAGES),$(MAKE) -C $(var) build || exit 1;)
910

11+
build-arm:
12+
@$(foreach var,$(ARM_IMAGES),$(MAKE) -C $(var) build-arm || exit 1;)
13+
1014
# Requires login at https://docker.elastic.co:7000/.
1115
push:
1216
@$(foreach var,$(IMAGES),$(MAKE) -C $(var) push || exit 1;)
1317

14-
.PHONY: build push
18+
push-arm:
19+
@$(foreach var,$(ARM_IMAGES),$(MAKE) -C $(var) push-arm || exit 1;)
20+
21+
.PHONY: build build-arm push push-arm

go/Makefile.debian11

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
IMAGES := base main darwin arm armhf darwin-arm64 npcap
1+
IMAGES := base main darwin armhf npcap
2+
ARM_IMAGES := base-arm darwin-arm64
23
DEBIAN_VERSION := 11
34
TAG_EXTENSION := -debian11
45

@@ -7,8 +8,14 @@ export DEBIAN_VERSION TAG_EXTENSION
78
build:
89
@$(foreach var,$(IMAGES),$(MAKE) -C $(var) build || exit 1;)
910

11+
build-arm:
12+
@$(foreach var,$(ARM_IMAGES),$(MAKE) -C $(var) build-arm || exit 1;)
13+
1014
# Requires login at https://docker.elastic.co:7000/.
1115
push:
1216
@$(foreach var,$(IMAGES),$(MAKE) -C $(var) push || exit 1;)
1317

14-
.PHONY: build push
18+
push-arm:
19+
@$(foreach var,$(ARM_IMAGES),$(MAKE) -C $(var) push-arm || exit 1;)
20+
21+
.PHONY: build build-arm push push-arm

go/Makefile.debian12

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
IMAGES := base main darwin arm armhf armel mips s390x darwin-arm64 npcap
1+
IMAGES := base main darwin armhf armel mips s390x npcap
2+
ARM_IMAGES := base-arm darwin-arm64
23
DEBIAN_VERSION := 12
34
TAG_EXTENSION := -debian12
45

@@ -7,8 +8,14 @@ export DEBIAN_VERSION TAG_EXTENSION
78
build:
89
@$(foreach var,$(IMAGES),$(MAKE) -C $(var) build || exit 1;)
910

11+
build-arm:
12+
@$(foreach var,$(ARM_IMAGES),$(MAKE) -C $(var) build-arm || exit 1;)
13+
1014
# Requires login at https://docker.elastic.co:7000/.
1115
push:
1216
@$(foreach var,$(IMAGES),$(MAKE) -C $(var) push || exit 1;)
1317

14-
.PHONY: build push
18+
push-arm:
19+
@$(foreach var,$(ARM_IMAGES),$(MAKE) -C $(var) push-arm || exit 1;)
20+
21+
.PHONY: build build-arm push push-arm

go/base-arm/Dockerfile.tmpl

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,33 @@ RUN \
2525
libxml2-dev \
2626
libxml2 \
2727
libicu-dev \
28-
libicu57 \
2928
icu-devtools \
3029
libsystemd-dev \
30+
{{- if eq .DEBIAN_VERSION "9" }}
31+
libicu57 \
3132
librpm3 \
3233
librpmio3 \
3334
librpmbuild3 \
3435
librpmsign3 \
36+
{{- else if eq .DEBIAN_VERSION "10" }}
37+
libicu63 \
38+
librpm8 \
39+
librpmio8 \
40+
librpmbuild8 \
41+
librpmsign8 \
42+
{{- else if eq .DEBIAN_VERSION "11" }}
43+
libicu67 \
44+
librpm9 \
45+
librpmio9 \
46+
librpmbuild9 \
47+
librpmsign9 \
48+
{{- else }}
49+
libicu72 \
50+
librpm9 \
51+
librpmio9 \
52+
librpmbuild9 \
53+
librpmsign9 \
54+
{{- end }}
3555
libsqlite3-dev \
3656
libnss3 \
3757
libsqlite3-0 \
@@ -77,7 +97,7 @@ RUN go mod init github.com/elastic/golang-crossbuild-$GOLANG_VERSION-arm \
7797
&& CGO_ENABLED=0 GOARCH=arm64 go build -o /crossbuild /entrypoint.go \
7898
&& rm -rf /go/* /root/.cache/* /entrypoint.go
7999

80-
COPY sdks/libpcap-1.8.1.tar.gz .
100+
COPY sdks/libpcap-1.8.1.tar.gz .
81101
RUN mkdir /libpcap \
82102
&& tar -xzf libpcap-1.8.1.tar.gz -C /libpcap \
83103
&& cd /libpcap/libpcap-1.8.1 \

go/base-arm/sources-debian10.list

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# see https://wiki.debian.org/CrossToolchains
2+
deb [arch=arm64] http://deb.debian.org/debian buster main
3+
deb [arch=arm64] http://security.debian.org/debian-security buster/updates main

go/base-arm/sources-debian11.list

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# see https://wiki.debian.org/CrossToolchains
2+
deb [arch=arm64] http://deb.debian.org/debian bullseye main
3+
deb [arch=arm64] http://deb.debian.org/debian bullseye-updates main
4+
deb [arch=arm64] http://deb.debian.org/debian-security/ bullseye-security main

go/base-arm/sources-debian12.list

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# see https://wiki.debian.org/CrossToolchains
2+
deb [arch=arm64] http://deb.debian.org/debian bookworm main
3+
deb [arch=arm64] http://deb.debian.org/debian-security/ bookworm-security main

go/base-arm/sources-debian9.list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
deb http://archive.debian.org/debian stretch main
1+
deb [arch=arm64] http://archive.debian.org/debian stretch main
22
deb [arch=arm64] http://archive.debian.org/debian-security stretch/updates main

0 commit comments

Comments
 (0)