envoy: Bump to v1.24.10 #380
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Build & Push | |
on: | |
pull_request_target: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build-and-push-prs: | |
timeout-minutes: 360 | |
name: Build and push multi-arch images | |
runs-on: ubuntu-latest-64-cores-256gb | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2.9.1 | |
- name: Cache Docker layers | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | |
with: | |
path: /tmp/buildx-cache | |
key: docker-cache-${{ github.head_ref }} | |
restore-keys: docker-cache-${{ github.base_ref }} | |
- name: Login to quay.io | |
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_ENVOY_USERNAME_DEV }} | |
password: ${{ secrets.QUAY_ENVOY_PASSWORD_DEV }} | |
- name: Checkout PR | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Prep for build | |
run: | | |
echo "${{ github.event.pull_request.head.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-dev:${{ 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 (dev) | |
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 | |
if: steps.cilium-builder-tag-in-repositories.outputs.exists == 'false' | |
id: docker_build_builder_ci | |
with: | |
provenance: false | |
context: . | |
file: ./Dockerfile.builder | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: quay.io/${{ github.repository_owner }}/cilium-envoy-builder-dev:${{ env.BAZEL_VERSION }}-${{ env.BUILDER_DOCKER_HASH }} | |
- name: CI Builder Image Digest | |
if: steps.cilium-builder-tag-in-repositories.outputs.exists == 'false' | |
shell: bash | |
run: | | |
echo "Digests:" | |
echo "quay.io/${{ github.repository_owner }}/cilium-envoy-dev:${{ env.BAZEL_VERSION }}-${{ env.BUILDER_DOCKER_HASH }}@${{ steps.docker_build_builder_ci.outputs.digest }}" | |
- name: Retrieve Archive image | |
id: cilium_archive_tag | |
shell: bash | |
run: | | |
if docker buildx imagetools inspect quay.io/${{ github.repository_owner }}/cilium-envoy-builder:${{ github.base_ref }}-archive-latest &>/dev/null; then | |
echo archive_image="quay.io/${{ github.repository_owner }}/cilium-envoy-builder:${{ github.base_ref }}-archive-latest" >> $GITHUB_OUTPUT | |
else | |
# Fallback to master archive image | |
echo archive_image="quay.io/${{ github.repository_owner }}/cilium-envoy-builder:master-archive-latest" >> $GITHUB_OUTPUT | |
fi | |
- name: PR Multi-arch build & push of cilium-envoy | |
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 | |
id: docker_build_ci | |
with: | |
provenance: false | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
build-args: | | |
BUILDER_BASE=quay.io/cilium/cilium-envoy-builder-dev:${{ env.BAZEL_VERSION }}-${{ env.BUILDER_DOCKER_HASH }} | |
ARCHIVE_IMAGE=${{ steps.cilium_archive_tag.outputs.archive_image }} | |
BAZEL_BUILD_OPTS=--remote_upload_local_results=false | |
cache-from: type=local,src=/tmp/buildx-cache | |
cache-to: type=local,dest=/tmp/buildx-cache,mode=max | |
push: true | |
tags: | | |
quay.io/${{ github.repository_owner }}/cilium-envoy-dev:${{ github.event.pull_request.head.sha }} | |
quay.io/${{ github.repository_owner }}/cilium-envoy-dev:${{ github.base_ref }}-${{ github.event.pull_request.head.sha }} | |
- name: Envoy binary version check | |
shell: bash | |
run: | | |
docker create -ti --name cilium-envoy quay.io/${{ github.repository_owner }}/cilium-envoy-dev:${{ github.event.pull_request.head.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.base_ref }} | sed 's/^v//') | |
echo ${envoy_version} | |
[[ "${envoy_version}" == *"${{ github.event.pull_request.head.sha }}/$expected_ersion"* ]] | |
- name: CI Image Digest | |
shell: bash | |
run: | | |
echo "Digests:" | |
echo "quay.io/${{ github.repository_owner }}/cilium-envoy-dev:${{ github.event.pull_request.head.sha }}@${{ steps.docker_build_ci.outputs.digest }}" | |
echo "quay.io/${{ github.repository_owner }}/cilium-envoy-dev:${{ github.base_ref }}-${{ github.event.pull_request.head.sha }}@${{ steps.docker_build_ci.outputs.digest }}" |