Skip to content

envoy: Bump to v1.23.12 #149

envoy: Bump to v1.23.12

envoy: Bump to v1.23.12 #149

name: Refresh test & build cache & build latest
on:
push:
branches:
- v1.23
jobs:
test-cache-refresh:
timeout-minutes: 360
name: Build test cache and push images
runs-on: ubuntu-latest-64-cores-256gb
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@ecf95283f03858871ff00b787d79c419715afc34 # v2.7.0
- name: Enable Docker IPv6
run: |
modprobe -v ipv6
sudo sed -i -e '1s!^{!\{ "ipv6": true, "fixed-cidr-v6": "fd00::/80",!' /etc/docker/daemon.json || echo '{ "ipv6": true, "fixed-cidr-v6": "fd00::/80" }' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
- name: Login to quay.io
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
registry: quay.io
username: ${{ secrets.QUAY_ENVOY_USERNAME }}
password: ${{ secrets.QUAY_ENVOY_PASSWORD }}
- name: Checkout PR
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Pull proxylib/libcilium.so
run: |
docker create -ti --name cilium-proxylib quay.io/cilium/cilium:stable bash
docker cp -L cilium-proxylib:/usr/lib/libcilium.so proxylib/libcilium.so
docker rm -fv cilium-proxylib
- name: Prep for build
run: |
echo "${{ github.sha }}" >SOURCE_VERSION
echo "BAZEL_VERSION=$(cat .bazelversion)" >> $GITHUB_ENV
echo "BUILDER_DOCKER_HASH=$(git ls-tree --full-tree HEAD -- ./Dockerfile.builder.tests | awk '{ print $3 }')" >> $GITHUB_ENV
- name: Checking if cilium-envoy-builder:test image exists
id: cilium-builder-test-tag-in-repositories
shell: bash
run: |
if docker buildx imagetools inspect quay.io/${{ github.repository_owner }}/cilium-envoy-builder:test-${{ env.BAZEL_VERSION }}-${{ env.BUILDER_DOCKER_HASH }} &>/dev/null; then
echo exists="true" >> $GITHUB_OUTPUT
else
echo exists="false" >> $GITHUB_OUTPUT
fi
- name: PR Multi-arch build & push of Builder image (test)
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
if: steps.cilium-builder-test-tag-in-repositories.outputs.exists == 'false'
id: docker_build_builder_test
with:
provenance: false
context: .
file: ./Dockerfile.builder.tests
platforms: linux/amd64,linux/arm64
push: true
tags: |
quay.io/${{ github.repository_owner }}/cilium-envoy-builder:test-${{ env.BAZEL_VERSION }}-${{ env.BUILDER_DOCKER_HASH }}
quay.io/${{ github.repository_owner }}/cilium-envoy-builder:test-${{ env.BAZEL_VERSION }}-latest
- name: Multi-arch update integration test archive
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
id: docker_tests_ci_build
with:
context: .
file: ./Dockerfile.tests
target: builder-archive
platforms: linux/amd64,linux/arm64
build-args: |
BUILDER_BASE=quay.io/${{ github.repository_owner }}/cilium-envoy-builder:test-${{ env.BAZEL_VERSION }}-${{ env.BUILDER_DOCKER_HASH }}
COPY_CACHE_EXT=.new
BAZEL_BUILD_OPTS="--jobs=HOST_CPUS*.75"
push: true
tags: |
quay.io/${{ github.repository_owner }}/cilium-envoy-builder:test-${{ github.ref_name }}-archive-latest
- name: Cache Docker layers
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: /tmp/buildx-cache
key: docker-cache-tests-${{ github.ref_name }}
- name: Clear cache
run: rm -rf /tmp/buildx-cache/*
- name: Run integration tests on amd64 to update docker cache
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
id: docker_tests_ci_cache_update
with:
provenance: false
context: .
file: ./Dockerfile.tests
platforms: linux/amd64
build-args: |
BUILDER_BASE=quay.io/${{ github.repository_owner }}/cilium-envoy-builder:test-${{ env.BAZEL_VERSION }}-${{ env.BUILDER_DOCKER_HASH }}
ARCHIVE_IMAGE=quay.io/${{ github.repository_owner }}/cilium-envoy-builder:test-${{ github.ref_name }}-archive-latest
BAZEL_BUILD_OPTS=--remote_upload_local_results=false
cache-to: type=local,dest=/tmp/buildx-cache,mode=max
push: true
tags: quay.io/${{ github.repository_owner }}/cilium-envoy:latest-testlogs
build-cache-and-push-images:
timeout-minutes: 360
name: Build cache and push images
runs-on: ubuntu-latest-64-cores-256gb
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@ecf95283f03858871ff00b787d79c419715afc34 # v2.7.0
- name: Login to quay.io
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
registry: quay.io
username: ${{ secrets.QUAY_ENVOY_USERNAME }}
password: ${{ secrets.QUAY_ENVOY_PASSWORD }}
- name: Checkout PR
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Prep for build
run: |
echo "${{ github.sha }}" >SOURCE_VERSION
echo "BAZEL_VERSION=$(cat .bazelversion)" >> $GITHUB_ENV
echo "BUILDER_DOCKER_HASH=$(git ls-tree --full-tree HEAD -- ./Dockerfile.builder | awk '{ print $3 }')" >> $GITHUB_ENV
- name: Checking if cilium-envoy-builder image exists
id: cilium-builder-tag-in-repositories
shell: bash
run: |
if docker buildx imagetools inspect quay.io/${{ github.repository_owner }}/cilium-envoy-builder:${{ env.BAZEL_VERSION }}-${{ env.BUILDER_DOCKER_HASH }} &>/dev/null; then
echo exists="true" >> $GITHUB_OUTPUT
else
echo exists="false" >> $GITHUB_OUTPUT
fi
- name: PR Multi-arch build & push of Builder image
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
if: steps.cilium-builder-tag-in-repositories.outputs.exists == 'false'
id: docker_build_builder
with:
provenance: false
context: .
file: ./Dockerfile.builder
platforms: linux/amd64,linux/arm64
push: true
tags: |
quay.io/${{ github.repository_owner }}/cilium-envoy-builder:${{ env.BAZEL_VERSION }}-${{ env.BUILDER_DOCKER_HASH }}
quay.io/${{ github.repository_owner }}/cilium-envoy-builder:${{ env.BAZEL_VERSION }}-latest
- name: Multi-arch build & push of build artifact archive
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
with:
context: .
file: ./Dockerfile
target: builder-archive
platforms: linux/amd64,linux/arm64
build-args: |
BUILDER_BASE=quay.io/${{ github.repository_owner }}/cilium-envoy-builder:${{ env.BAZEL_VERSION }}-${{ env.BUILDER_DOCKER_HASH }}
COPY_CACHE_EXT=.new
BAZEL_BUILD_OPTS="--jobs=HOST_CPUS*.75"
push: true
tags: |
quay.io/${{ github.repository_owner }}/cilium-envoy-builder:${{ github.ref_name }}-archive-latest
- name: Cache Docker layers
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: /tmp/buildx-cache
key: docker-cache-${{ github.ref_name }}
- name: Clear cache
run: |
rm -rf /tmp/buildx-cache/*
docker buildx prune -f
- name: Multi-arch build & push ${{ github.ref_name }} latest
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
id: docker_build_cd
with:
provenance: false
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
build-args: |
BUILDER_BASE=quay.io/${{ github.repository_owner }}/cilium-envoy-builder:${{ env.BAZEL_VERSION }}-${{ env.BUILDER_DOCKER_HASH }}
BAZEL_BUILD_OPTS=--remote_upload_local_results=false
ARCHIVE_IMAGE=quay.io/${{ github.repository_owner }}/cilium-envoy-builder:${{ github.ref_name }}-archive-latest
cache-to: type=local,dest=/tmp/buildx-cache,mode=max
push: true
tags: |
quay.io/${{ github.repository_owner }}/cilium-envoy:${{ github.sha }}
quay.io/${{ github.repository_owner }}/cilium-envoy:${{ github.ref_name }}-${{ github.sha }}
- name: Envoy binary version check
shell: bash
run: |
docker create -ti --name cilium-envoy quay.io/${{ github.repository_owner }}/cilium-envoy:${{ github.sha }} bash
docker cp cilium-envoy:/usr/bin/cilium-envoy ./cilium-envoy
docker rm -fv cilium-envoy
envoy_version=$(./cilium-envoy --version)
expected_ersion=$(echo ${{ github.ref_name }} | sed 's/^v//')
echo ${envoy_version}
[[ "${envoy_version}" == *"${{ github.sha }}/$expected_ersion"* ]]
- name: Release Image Digest
shell: bash
run: |
echo "Digests:"
echo "quay.io/${{ github.repository_owner }}/cilium-envoy:${{ github.sha }}@${{ steps.docker_build_cd.outputs.digest }}"
echo "quay.io/${{ github.repository_owner }}/cilium-envoy:${{ github.ref_name }}-${{ github.sha }}@${{ steps.docker_build_cd.outputs.digest }}"