Skip to content

Commit 57873e6

Browse files
AkihiroSudasamuelkarp
authored andcommitted
release: rollback Ubuntu to 18.04 (except for riscv64)
Partially revert 0e56e4f Rollback the build environment from Ubuntu 22.04 to 18.04, except for riscv64 that isn't supported by Ubuntu 18.04. Fix issue 7255 (`1.6.7 can't be run on Ubuntu LTS 20.04 (GLIBC_2.34 not found)`) Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> (cherry picked from commit 4818610) Signed-off-by: Samuel Karp <samuelkarp@google.com>
1 parent 0197261 commit 57873e6

2 files changed

Lines changed: 20 additions & 12 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,24 @@ jobs:
5050

5151
build:
5252
name: Build Release Binaries
53-
runs-on: ${{ matrix.os }}
53+
runs-on: ubuntu-${{ matrix.ubuntu }}
5454
needs: [check]
5555
timeout-minutes: 20
5656
strategy:
5757
matrix:
58-
os: [ubuntu-18.04]
59-
platform:
60-
- linux/amd64
61-
- linux/arm64
62-
- linux/ppc64le
63-
- linux/riscv64
64-
- windows/amd64
58+
include:
59+
# Choose an old release of Ubuntu to avoid glibc issue https://github.com/containerd/containerd/issues/7255
60+
- ubuntu: 18.04
61+
platform: linux/amd64
62+
- ubuntu: 18.04
63+
platform: linux/arm64
64+
- ubuntu: 18.04
65+
platform: linux/ppc64le
66+
# riscv64 isn't supported by Ubuntu 18.04
67+
- ubuntu: 22.04
68+
platform: linux/riscv64
69+
- ubuntu: 18.04
70+
platform: windows/amd64
6571
steps:
6672
- name: Install Go
6773
uses: actions/setup-go@v2
@@ -70,7 +76,7 @@ jobs:
7076
- name: Set env
7177
shell: bash
7278
env:
73-
MOS: ${{ matrix.os }}
79+
MOS: ubuntu-${{ matrix.ubuntu }}
7480
run: |
7581
releasever=${{ github.ref }}
7682
releasever="${releasever#refs/tags/}"
@@ -102,7 +108,7 @@ jobs:
102108
export PREFIX_LEN=12
103109
BUILD_ARGS="--build-arg GATEWAY --build-arg PREFIX_LEN"
104110
fi
105-
docker buildx build ${cache} --build-arg RELEASE_VER --build-arg GO_VERSION ${BUILD_ARGS} -f .github/workflows/release/Dockerfile --platform=${PLATFORM} -o releases/ .
111+
docker buildx build ${cache} --build-arg RELEASE_VER --build-arg UBUNTU_VERSION=${{ matrix.ubuntu }} --build-arg GO_VERSION ${BUILD_ARGS} -f .github/workflows/release/Dockerfile --platform=${PLATFORM} -o releases/ .
106112
echo PLATFORM_CLEAN=${PLATFORM/\//-} >> $GITHUB_ENV
107113
108114
# Remove symlinks since we don't want these in the release Artifacts

.github/workflows/release/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG UBUNTU_VERSION=22.04
15+
# UBUNTU_VERSION can be set to 18.04 (bionic), 20.04 (focal), or 22.04 (jammy)
16+
ARG UBUNTU_VERSION=18.04
1617
ARG BASE_IMAGE=ubuntu:${UBUNTU_VERSION}
1718
ARG GO_VERSION
1819
ARG GO_IMAGE=golang:${GO_VERSION}
@@ -25,7 +26,8 @@ SHELL ["/bin/bash", "-xec"]
2526
RUN apt-get update && \
2627
apt-get install -y dpkg-dev git make pkg-config
2728
ARG TARGETPLATFORM
28-
RUN xx-apt-get install -y libseccomp-dev libbtrfs-dev gcc
29+
RUN xx-apt-get install -y libseccomp-dev btrfs-progs gcc
30+
RUN if grep -qE 'UBUNTU_CODENAME=(focal|jammy)' /etc/os-release; then xx-apt-get install -y libbtrfs-dev; fi
2931
ENV PATH=/usr/local/go/bin:$PATH
3032
ENV GOPATH=/go
3133
ENV CGO_ENABLED=1

0 commit comments

Comments
 (0)