From c50d9f79f3b34744eb46cee3f7b2349a1a433410 Mon Sep 17 00:00:00 2001 From: Ivan Dyachkov Date: Tue, 30 Apr 2024 11:36:54 +0200 Subject: [PATCH 1/2] feat: add ubuntu 24.04 --- .github/workflows/base.yaml | 2 ++ .github/workflows/main.yaml | 9 +++--- .github/workflows/test.yaml | 2 ++ Makefile | 2 +- get-fdb.sh | 2 +- ubuntu24.04/Dockerfile | 58 +++++++++++++++++++++++++++++++++++++ 6 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 ubuntu24.04/Dockerfile diff --git a/.github/workflows/base.yaml b/.github/workflows/base.yaml index 7f573a0..1099d61 100644 --- a/.github/workflows/base.yaml +++ b/.github/workflows/base.yaml @@ -18,6 +18,8 @@ jobs: base_image_vsn: - "5.0" platform: + - [ubuntu24.04, linux/amd64, [self-hosted, linux, x64, ephemeral]] + - [ubuntu24.04, linux/arm64, [self-hosted, linux, arm64, ephemeral]] - [ubuntu22.04, linux/amd64, [self-hosted, linux, x64, ephemeral]] - [ubuntu22.04, linux/arm64, [self-hosted, linux, arm64, ephemeral]] - [ubuntu20.04, linux/amd64, [self-hosted, linux, x64, ephemeral]] diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 1e2ff26..6404d40 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -37,6 +37,8 @@ jobs: base_image_vsn: - "5.0" platform: + - [ubuntu24.04, linux/amd64, [self-hosted, linux, x64, ephemeral]] + - [ubuntu24.04, linux/arm64, [self-hosted, linux, arm64, ephemeral]] - [ubuntu22.04, linux/amd64, [self-hosted, linux, x64, ephemeral]] - [ubuntu22.04, linux/arm64, [self-hosted, linux, arm64, ephemeral]] - [ubuntu20.04, linux/amd64, [self-hosted, linux, x64, ephemeral]] @@ -122,7 +124,8 @@ jobs: otp: ${{ fromJSON(needs.prepare.outputs.otp) }} elixir: ${{ fromJSON(needs.prepare.outputs.elixir) }} platform: - - [ubuntu22.04fdb, linux/amd64, [self-hosted, linux, x64, ephemeral]] + - [ubuntu24.04, linux/amd64, [self-hosted, linux, x64, ephemeral]] + - [ubuntu24.04, linux/arm64, [self-hosted, linux, arm64, ephemeral]] - [ubuntu22.04, linux/amd64, [self-hosted, linux, x64, ephemeral]] - [ubuntu22.04, linux/arm64, [self-hosted, linux, arm64, ephemeral]] - [ubuntu20.04, linux/amd64, [self-hosted, linux, x64, ephemeral]] @@ -220,15 +223,13 @@ jobs: otp: ${{ fromJSON(needs.prepare.outputs.otp) }} elixir: ${{ fromJSON(needs.prepare.outputs.elixir) }} platform: - - ubuntu22.04fdb + - ubuntu24.04 - ubuntu22.04 - ubuntu20.04 - ubuntu18.04 - - ubuntu16.04 - debian12 - debian11 - debian10 - - debian9 - el9 - el8 - el7 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2c06a47..e8a402c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -55,6 +55,8 @@ jobs: otp: ${{ fromJSON(needs.prepare.outputs.otp) }} elixir: ${{ fromJSON(needs.prepare.outputs.elixir) }} platform: + - [ubuntu24.04, linux/amd64, [self-hosted, linux, x64, ephemeral]] + - [ubuntu24.04, linux/arm64, [self-hosted, linux, arm64, ephemeral]] - [ubuntu22.04, linux/amd64, [self-hosted, linux, x64, ephemeral]] - [ubuntu22.04, linux/arm64, [self-hosted, linux, arm64, ephemeral]] - [ubuntu20.04, linux/amd64, [self-hosted, linux, x64, ephemeral]] diff --git a/Makefile b/Makefile index 567af79..c806e85 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -IMAGES = alpine3.15 amzn2 amzn2023 debian10 debian11 debian12 el7 el8 el9 ubuntu18.04 ubuntu20.04 ubuntu22.04 +IMAGES = alpine3.15 amzn2 amzn2023 debian10 debian11 debian12 el7 el8 el9 ubuntu18.04 ubuntu20.04 ubuntu22.04 ubuntu24.04 .PHONY: all all: $(IMAGES) diff --git a/get-fdb.sh b/get-fdb.sh index 06ba7a6..869ee17 100755 --- a/get-fdb.sh +++ b/get-fdb.sh @@ -36,7 +36,7 @@ elif [[ "${ID:-}" =~ debian|ubuntu ]]; then ARCH=$(dpkg --print-architecture) SYSTEM="${ID}${VERSION_ID}" case ${SYSTEM} in - debian11 | debian12 | ubuntu20.04 | ubuntu22.04) + debian11 | debian12 | ubuntu20.04 | ubuntu22.04 | ubuntu24.04) wget "${BASE_URL}/foundationdb-clients_${FDB_VERSION}-1_${ARCH}.deb" -O foundationdb-clients.deb dpkg -i foundationdb-clients.deb rm foundationdb-clients.deb diff --git a/ubuntu24.04/Dockerfile b/ubuntu24.04/Dockerfile new file mode 100644 index 0000000..706cdc0 --- /dev/null +++ b/ubuntu24.04/Dockerfile @@ -0,0 +1,58 @@ +ARG BUILD_FROM=public.ecr.aws/ubuntu/ubuntu:24.04 +FROM ${BUILD_FROM} + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y \ + apt-transport-https \ + autoconf \ + automake \ + autotools-dev \ + bison \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + debhelper \ + expect \ + flex \ + git \ + inotify-tools \ + jq \ + krb5-admin-server \ + krb5-kdc \ + libffi-dev \ + libkrb5-3 \ + libkrb5-dev \ + libncurses5-dev \ + libsasl2-2 \ + libsasl2-dev \ + libsasl2-modules-gssapi-mit \ + libssl-dev \ + libtool \ + python3 \ + python3-pip \ + software-properties-common \ + unixodbc \ + unixodbc-dev \ + unzip \ + vim \ + wget \ + zip \ + zlib1g-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +RUN ln -sf /usr/bin/python3 /usr/bin/python && \ + ln -sf /usr/bin/pip3 /usr/bin/pip + +RUN cmake --version + +WORKDIR / + +# Elixir complains if runs without UTF-8 +ENV LC_ALL=C.UTF-8 +ENV LANG=C.UTF-8 + +WORKDIR / +CMD [ "/bin/bash" ] From 7eff4943cfa9675de62b402d335d0bb600b545bb Mon Sep 17 00:00:00 2001 From: Ivan Dyachkov Date: Tue, 30 Apr 2024 11:59:51 +0200 Subject: [PATCH 2/2] ci: bump actions versions --- .github/workflows/base.yaml | 14 ++++++------- .github/workflows/main.yaml | 42 ++++++++++++++++++------------------- .github/workflows/test.yaml | 16 +++++++------- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/base.yaml b/.github/workflows/base.yaml index 1099d61..94e096b 100644 --- a/.github/workflows/base.yaml +++ b/.github/workflows/base.yaml @@ -49,8 +49,8 @@ jobs: REGISTRY_IMAGE: ghcr.io/${{ github.repository }}/base-${{ matrix.base_image_vsn }} steps: - - uses: actions/checkout@v3 - - uses: aws-actions/configure-aws-credentials@v2 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -63,20 +63,20 @@ jobs: echo "tag=${{ matrix.platform[0] }}-${ARCH}" | tee -a $GITHUB_OUTPUT - name: Get cache run: aws s3 sync s3://docker-buildx-cache/emqx-builder/${{ steps.base_tag.outputs.tag }} /tmp/.docker-buildx-cache - - uses: docker/setup-buildx-action@v3 - - uses: docker/setup-qemu-action@v3 - - uses: docker/login-action@v3 + - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }} - - uses: docker/metadata-action@v5 + - uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 id: base_meta with: images: ${{ env.REGISTRY_IMAGE }} tags: type=raw,value=${{ steps.base_tag.outputs.tag }} - name: Build base image - uses: docker/build-push-action@v5 + uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 with: push: true pull: true diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6404d40..925da60 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -17,7 +17,7 @@ jobs: otp: ${{ steps.otp.outputs.version }} elixir: ${{ steps.elixir.outputs.version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: get otp_version id: otp run: | @@ -68,8 +68,8 @@ jobs: REGISTRY_IMAGE: ghcr.io/${{ github.repository }}/base-${{ matrix.base_image_vsn }} steps: - - uses: actions/checkout@v3 - - uses: aws-actions/configure-aws-credentials@v2 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -82,21 +82,21 @@ jobs: echo "tag=${{ matrix.platform[0] }}-${ARCH}" | tee -a $GITHUB_OUTPUT - name: Get cache run: aws s3 sync s3://docker-buildx-cache/emqx-builder/${{ steps.base_tag.outputs.tag }} /tmp/.docker-buildx-cache - - uses: docker/setup-buildx-action@v3 - - uses: docker/setup-qemu-action@v3 - - uses: docker/login-action@v3 + - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }} - - uses: docker/metadata-action@v5 + - uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 id: base_meta with: images: ${{ env.REGISTRY_IMAGE }} tags: type=raw,value=${{ steps.base_tag.outputs.tag }} - name: Build base image id: build - uses: docker/build-push-action@v5 + uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 with: pull: true push: true @@ -156,7 +156,7 @@ jobs: - [alpine3.15.1, linux/arm64, [self-hosted, linux, arm64, ephemeral]] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Get ref id: ref run: echo "ref=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT @@ -164,14 +164,14 @@ jobs: id: registry run: | echo "image=ghcr.io/${{ github.repository }}/${{ steps.ref.outputs.ref }}" | tee -a $GITHUB_OUTPUT - - uses: docker/setup-buildx-action@v3 - - uses: docker/setup-qemu-action@v3 - - uses: docker/login-action@v3 + - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }} - - uses: docker/metadata-action@v5 + - uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 id: meta with: images: ${{ steps.registry.outputs.image }} @@ -183,7 +183,7 @@ jobs: TAG="${{ matrix.platform[0] }}-${ARCH}" echo "tag=${TAG}" | tee -a $GITHUB_OUTPUT echo "image=ghcr.io/${{ github.repository }}/base-${{ matrix.base_image_vsn }}:${TAG}" | tee -a $GITHUB_OUTPUT - - uses: docker/build-push-action@v5 + - uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 id: build with: pull: true @@ -203,7 +203,7 @@ jobs: digest="${{ steps.build.outputs.digest }}" touch "/tmp/digests/${digest#sha256:}" - name: Upload digest - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: name: "digests-${{ matrix.platform[0] }}-${{ matrix.otp }}-${{ matrix.elixir }}" path: /tmp/digests/* @@ -246,21 +246,21 @@ jobs: run: | echo "image=ghcr.io/${{ github.repository }}/${{ steps.ref.outputs.ref }}" | tee -a $GITHUB_OUTPUT - name: Download digests - uses: actions/download-artifact@v3 + uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 with: name: "digests-${{ matrix.platform }}-${{ matrix.otp }}-${{ matrix.elixir }}" path: /tmp/digests - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 - name: Docker meta id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 with: images: ${{ steps.registry.outputs.image }} tags: | type=raw,value=${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.platform }} - name: Login to Docker Hub - uses: docker/login-action@v3 + uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -281,10 +281,10 @@ jobs: if: startsWith(github.ref, 'refs/tags/') steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Create Release id: create_release - uses: actions/create-release@v1 + uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e8a402c..7530c86 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,7 +11,7 @@ jobs: sanity-checks: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Check workflow files env: ACTIONLINT_VSN: 1.6.25 @@ -30,7 +30,7 @@ jobs: otp: ${{ steps.otp.outputs.version }} elixir: ${{ steps.elixir.outputs.version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: get otp_version id: otp run: | @@ -83,13 +83,13 @@ jobs: - [alpine3.15.1, linux/arm64, [self-hosted, linux, arm64, ephemeral]] steps: - - uses: actions/checkout@v3 - - uses: aws-actions/configure-aws-credentials@v2 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ secrets.AWS_DEFAULT_REGION }} - - uses: docker/login-action@v3 + - uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -104,11 +104,11 @@ jobs: echo "image=ghcr.io/${{ github.repository }}/base-${{ matrix.base_image_vsn }}:${TAG}" | tee -a $GITHUB_OUTPUT - name: Get cache run: aws s3 sync s3://docker-buildx-cache/emqx-builder/${{ steps.base_tag.outputs.tag }} /tmp/.docker-buildx-cache - - uses: docker/setup-qemu-action@v3 - - uses: docker/setup-buildx-action@v3 + - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 with: driver-opts: network=host - - uses: docker/build-push-action@v5 + - uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 with: platforms: ${{ matrix.platform[1] }} cache-from: type=local,src=/tmp/.docker-buildx-cache,mode=max