Add support for multilevel subdomain prefix wildcard in DNS match pattern #80073
Workflow file for this run
This file contains hidden or 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: Build Commits | |
| # Any change in triggers needs to be reflected in the concurrency group. | |
| on: | |
| pull_request: {} | |
| push: | |
| branches: | |
| - main | |
| - ft/main/** | |
| # If the cache was cleaned we should re-build the cache with the latest commit | |
| workflow_run: | |
| workflows: | |
| - "Image CI Cache Cleaner" | |
| branches: | |
| - main | |
| - ft/main/** | |
| types: | |
| - completed | |
| permissions: read-all | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }} | |
| cancel-in-progress: true | |
| jobs: | |
| compute-vars: | |
| name: Compute variables | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| commits: ${{ steps.commits.outputs.commits }} | |
| head-commit: ${{ steps.commits.outputs.head-commit }} | |
| build-bpf: ${{ steps.bpf-changes.outputs.src }} | |
| build-test: ${{ steps.test-changes.outputs.src }} | |
| timeout-minutes: 180 | |
| steps: | |
| - name: Configure git | |
| run: | | |
| git config --global user.name "GitHub Actions" | |
| git config --global user.email "github-actions@users.noreply.github.com" | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| - name: Compute commit list | |
| id: commits | |
| run: | | |
| if [[ "${{ github.event_name == 'push' || github.event_name == 'workflow_run' }}" == "true" ]]; then | |
| commits=${{ github.sha }} | |
| head_commit=${{ github.sha }} | |
| else | |
| commits=$(git rev-list ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | tr '\n' ' ') | |
| head_commit=${{ github.event.pull_request.head.sha }} | |
| fi | |
| echo "commits=$commits" >> $GITHUB_OUTPUT | |
| echo "head-commit=$head_commit" >> $GITHUB_OUTPUT | |
| - name: Check bpf code changes | |
| uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: bpf-changes | |
| with: | |
| # If these filters are modified, also modify the step: | |
| # build-commits-bpf: Check if datapath build works for every commit | |
| filters: | | |
| src: | |
| - '.github/workflows/lint-build-commits.yaml' | |
| - 'bpf/**' | |
| - '!**/*.md' | |
| - name: Check test code changes | |
| uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: test-changes | |
| with: | |
| # If these filters are modified, also modify the step: | |
| # build-commits-test: Check if ginkgo test suite build works for every commit | |
| filters: | | |
| src: | |
| - '.github/workflows/lint-build-commits.yaml' | |
| - 'pkg/**' | |
| - 'test/**' | |
| - '!**/*.md' | |
| build-commits-cilium: | |
| name: Check if cilium builds for every commit | |
| runs-on: ${{ vars.GH_RUNNER_EXTRA_POWER_UBUNTU_LATEST || 'ubuntu-24.04' }} | |
| needs: [compute-vars] | |
| timeout-minutes: 180 | |
| steps: | |
| - name: Collect Workflow Telemetry | |
| uses: catchpoint/workflow-telemetry-action@94c3c3d9567a0205de6da68a76c428ce4e769af1 # v2.0.0 | |
| with: | |
| comment_on_pr: false | |
| - name: Configure git | |
| run: | | |
| git config --global user.name "GitHub Actions" | |
| git config --global user.email "github-actions@users.noreply.github.com" | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| - name: Cleanup Disk space in runner | |
| uses: ./.github/actions/disk-cleanup | |
| - name: Install Go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | |
| with: | |
| cache: false | |
| # renovate: datasource=golang-version depName=go | |
| go-version: 1.25.5 | |
| - name: Load Golang cache build from GitHub | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 | |
| id: go-cache | |
| with: | |
| path: /tmp/.cache/go | |
| key: ${{ runner.os }}-go-all-cache-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-all-cache- | |
| ${{ runner.os }}-go- | |
| - name: Load ccache cache build from GitHub | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 | |
| id: ccache-cache | |
| with: | |
| path: /tmp/.cache/ccache | |
| key: ${{ runner.os }}-ccache-${{ hashFiles('bpf/**') }} | |
| restore-keys: | | |
| ${{ runner.os }}-ccache- | |
| - name: Create cache directories if they don't exist | |
| if: ${{ steps.go-cache.outputs.cache-hit != 'true' || steps.ccache-cache.outputs.cache-hit != 'true' }} | |
| shell: bash | |
| run: | | |
| mkdir -p /tmp/.cache/go/.cache/go-build | |
| mkdir -p /tmp/.cache/go/pkg | |
| mkdir -p /tmp/.cache/ccache/.ccache | |
| - name: Check if build works for every commit | |
| if: ${{ github.event_name != 'push' || ( (github.event_name == 'push' || github.event_name == 'workflow_run' ) && (steps.go-cache.outputs.cache-hit != 'true' || steps.ccache-cache.outputs.cache-hit != 'true')) }} | |
| env: | |
| CLANG: "ccache clang" | |
| BUILDER_GOCACHE_DIR: "/tmp/.cache/go/.cache/go-build" | |
| BUILDER_GOMODCACHE_DIR: "/tmp/.cache/go/pkg" | |
| BUILDER_CCACHE_DIR: "/tmp/.cache/ccache/.ccache" | |
| run: | | |
| set -eu -o pipefail | |
| commits="${{ needs.compute-vars.outputs.commits }}" | |
| for commit in $commits; do | |
| git checkout $commit || exit 1 | |
| contrib/scripts/builder.sh make CLANG="${CLANG}" build -j "$(nproc)" || exit 1 | |
| done | |
| - name: Reset cache ownership to GitHub runners user | |
| if: ${{ steps.go-cache.outputs.cache-hit != 'true' || steps.ccache-cache.outputs.cache-hit != 'true' }} | |
| shell: bash | |
| run: | | |
| sudo du -sh /tmp/.cache/ | |
| sudo chown $USER:$USER -R /tmp/.cache | |
| - name: Failed commit during the build | |
| if: ${{ failure() }} | |
| run: git --no-pager log --format=%B -n 1 | |
| build-commits-hubble-cli: | |
| name: Check if hubble-cli builds for every commit | |
| runs-on: ${{ vars.GH_RUNNER_EXTRA_POWER_UBUNTU_LATEST || 'ubuntu-24.04' }} | |
| needs: [compute-vars] | |
| timeout-minutes: 180 | |
| steps: | |
| - name: Collect Workflow Telemetry | |
| uses: catchpoint/workflow-telemetry-action@94c3c3d9567a0205de6da68a76c428ce4e769af1 # v2.0.0 | |
| with: | |
| comment_on_pr: false | |
| - name: Configure git | |
| run: | | |
| git config --global user.name "GitHub Actions" | |
| git config --global user.email "github-actions@users.noreply.github.com" | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| - name: Cleanup Disk space in runner | |
| uses: ./.github/actions/disk-cleanup | |
| - name: Install Go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | |
| with: | |
| cache: false | |
| # renovate: datasource=golang-version depName=go | |
| go-version: 1.25.5 | |
| - name: Load hubble-cli Golang cache build from GitHub | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 | |
| id: hubble-cache | |
| with: | |
| path: /tmp/.cache/hubble-cli | |
| key: ${{ runner.os }}-go-hubble-cli-cache-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-hubble-cli-cache- | |
| ${{ runner.os }}-go- | |
| - name: Load ccache cache build from GitHub | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 | |
| id: ccache-cache | |
| with: | |
| path: /tmp/.cache/ccache | |
| key: ${{ runner.os }}-ccache-${{ hashFiles('bpf/**') }} | |
| restore-keys: | | |
| ${{ runner.os }}-ccache- | |
| - name: Create cache directories if they don't exist | |
| if: ${{ steps.ccache-cache.outputs.cache-hit != 'true' || steps.hubble-cache.outputs.cache-hit != 'true' }} | |
| shell: bash | |
| run: | | |
| mkdir -p /tmp/.cache/ccache/.ccache | |
| mkdir -p /tmp/.cache/hubble-cli/.cache/go-build | |
| mkdir -p /tmp/.cache/hubble-cli/pkg | |
| - name: Check if hubble CLI builds for every commit | |
| if: ${{ github.event_name != 'push' || ( github.event_name == 'push' && steps.hubble-cache.outputs.cache-hit != 'true' ) }} | |
| env: | |
| CLANG: "ccache clang" | |
| BUILDER_GOCACHE_DIR: "/tmp/.cache/hubble-cli/.cache/go-build" | |
| BUILDER_GOMODCACHE_DIR: "/tmp/.cache/hubble-cli/pkg" | |
| run: | | |
| set -eu -o pipefail | |
| commits="${{ needs.compute-vars.outputs.commits }}" | |
| head_commit="${{ needs.compute-vars.outputs.head-commit }}" | |
| for commit in $commits; do | |
| git checkout $commit || exit 1 | |
| echo "Only run full build (with \`local-release\`) for head commit (i.e. last commit in sequence)" | |
| target=hubble | |
| if [[ "$commit" == "$head_commit" ]]; then | |
| target=local-release | |
| fi | |
| echo "Running build: $target (commit: $commit)" | |
| contrib/scripts/builder.sh make CLANG="${CLANG}" -C hubble $target -j "$(nproc)" || exit 1 | |
| done | |
| - name: Reset cache ownership to GitHub runners user | |
| if: ${{ steps.ccache-cache.outputs.cache-hit != 'true' }} | |
| shell: bash | |
| run: | | |
| sudo du -sh /tmp/.cache/ | |
| sudo chown $USER:$USER -R /tmp/.cache | |
| - name: Failed commit during the build | |
| if: ${{ failure() }} | |
| run: git --no-pager log --format=%B -n 1 | |
| build-commits-bpf: | |
| name: Check if bpf builds for every commit | |
| runs-on: ${{ vars.GH_RUNNER_EXTRA_POWER_UBUNTU_LATEST || 'ubuntu-24.04' }} | |
| needs: [compute-vars] | |
| # Runs only if code under bpf/ is changed. | |
| if: needs.compute-vars.outputs.build-bpf == 'true' | |
| timeout-minutes: 180 | |
| steps: | |
| - name: Collect Workflow Telemetry | |
| uses: catchpoint/workflow-telemetry-action@94c3c3d9567a0205de6da68a76c428ce4e769af1 # v2.0.0 | |
| with: | |
| comment_on_pr: false | |
| - name: Configure git | |
| run: | | |
| git config --global user.name "GitHub Actions" | |
| git config --global user.email "github-actions@users.noreply.github.com" | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| - name: Cleanup Disk space in runner | |
| uses: ./.github/actions/disk-cleanup | |
| - name: Install Go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | |
| with: | |
| cache: false | |
| # renovate: datasource=golang-version depName=go | |
| go-version: 1.25.5 | |
| - name: Load Golang cache build from GitHub | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 | |
| id: go-cache | |
| with: | |
| path: /tmp/.cache/go | |
| key: ${{ runner.os }}-go-all-cache-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-all-cache- | |
| ${{ runner.os }}-go- | |
| - name: Load ccache cache build from GitHub | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 | |
| id: ccache-cache | |
| with: | |
| path: /tmp/.cache/ccache | |
| key: ${{ runner.os }}-ccache-${{ hashFiles('bpf/**') }} | |
| restore-keys: | | |
| ${{ runner.os }}-ccache- | |
| - name: Create cache directories if they don't exist | |
| if: ${{ steps.go-cache.outputs.cache-hit != 'true' || steps.ccache-cache.outputs.cache-hit != 'true' }} | |
| shell: bash | |
| run: | | |
| mkdir -p /tmp/.cache/go/.cache/go-build | |
| mkdir -p /tmp/.cache/go/pkg | |
| mkdir -p /tmp/.cache/ccache/.ccache | |
| - name: Check if datapath build works for every commit | |
| env: | |
| CLANG: "ccache clang" | |
| BUILDER_GOCACHE_DIR: "/tmp/.cache/go/.cache/go-build" | |
| BUILDER_GOMODCACHE_DIR: "/tmp/.cache/go/pkg" | |
| BUILDER_CCACHE_DIR: "/tmp/.cache/ccache/.ccache" | |
| run: | | |
| set -eu -o pipefail | |
| commits="${{ needs.compute-vars.outputs.commits }}" | |
| for commit in $commits; do | |
| git checkout $commit || exit 1 | |
| # Do not run make if there aren't any files modified in these | |
| # directories from the previous commit to the current commit. | |
| # If these filters are modified, also modify the step: | |
| # compute-vars: Check bpf code changes | |
| if ! git diff --quiet HEAD^ bpf/ ; then | |
| contrib/scripts/builder.sh make CLANG="${CLANG}" -C bpf build_all -j "$(nproc)" || exit 1 | |
| fi | |
| done | |
| - name: Reset cache ownership to GitHub runners user | |
| if: ${{ steps.go-cache.outputs.cache-hit != 'true' || steps.ccache-cache.outputs.cache-hit != 'true' }} | |
| shell: bash | |
| run: | | |
| sudo du -sh /tmp/.cache/ | |
| sudo chown $USER:$USER -R /tmp/.cache | |
| - name: Failed commit during the build | |
| if: ${{ failure() }} | |
| run: git --no-pager log --format=%B -n 1 | |
| build-commits-test: | |
| name: Check if test builds for every commit | |
| runs-on: ${{ vars.GH_RUNNER_EXTRA_POWER_UBUNTU_LATEST || 'ubuntu-24.04' }} | |
| needs: [compute-vars] | |
| # Runs only if code under test/ is changed. | |
| if: needs.compute-vars.outputs.build-test == 'true' | |
| timeout-minutes: 180 | |
| steps: | |
| - name: Collect Workflow Telemetry | |
| uses: catchpoint/workflow-telemetry-action@94c3c3d9567a0205de6da68a76c428ce4e769af1 # v2.0.0 | |
| with: | |
| comment_on_pr: false | |
| - name: Configure git | |
| run: | | |
| git config --global user.name "GitHub Actions" | |
| git config --global user.email "github-actions@users.noreply.github.com" | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| - name: Cleanup Disk space in runner | |
| uses: ./.github/actions/disk-cleanup | |
| - name: Install Go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | |
| with: | |
| cache: false | |
| # renovate: datasource=golang-version depName=go | |
| go-version: 1.25.5 | |
| - name: Set clang directory | |
| id: set_clang_dir | |
| run: echo "clang_dir=$HOME/.clang" >> $GITHUB_OUTPUT | |
| - name: Install LLVM and Clang prerequisites | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends libtinfo6 | |
| - name: Install LLVM and Clang | |
| uses: KyleMayes/install-llvm-action@98e68e10c96dffcb7bfed8b2144541a66b49aa02 # v2.0.8 | |
| with: | |
| version: "19.1.7" | |
| directory: ${{ steps.set_clang_dir.outputs.clang_dir }} | |
| - name: Install ginkgo | |
| run: | | |
| go install github.com/onsi/ginkgo/ginkgo@cc0216944b25a88d3259699a029d4e601fb8a222 # v1.12.1 | |
| - name: Check if ginkgo test suite build works for every commit | |
| run: | | |
| set -eu -o pipefail | |
| commits="${{ needs.compute-vars.outputs.commits }}" | |
| for commit in $commits; do | |
| git checkout $commit || exit 1 | |
| # Do not run make if there aren't any files modified in these | |
| # directories from the previous commit to the current commit. | |
| # If these filters are modified, also modify the step: | |
| # compute-vars: Check test code changes | |
| if ! git diff --quiet HEAD^ pkg/ test/ ; then | |
| (make -C test build -j "$(nproc)" && make -C test build-darwin -j "$(nproc)") || exit 1 | |
| fi | |
| done | |
| - name: Failed commit during the build | |
| if: ${{ failure() }} | |
| run: git --no-pager log --format=%B -n 1 |