Add OTEL build test and for NGINX v1.25 (#10889)

* Add OTEL build test

* Simplify otel compilation

* Remove http2 deprecated arg

* Move image build to CI

* Turn image from scratch to optimize usage

* rollback image from scratch

* Final reviews on nginx v1.25 image

* Remove s390x from final image
This commit is contained in:
Ricardo Katz 2024-01-27 12:33:50 -03:00 committed by GitHub
parent c295cd1c4b
commit 02e6ebc95a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 247 additions and 409 deletions

View file

@ -9,6 +9,7 @@ on:
- 'deploy/**'
- '**.md'
- 'images/**' # Images changes should be tested on their own workflow
- '!images/nginx-1.25/**'
push:
branches:
@ -41,6 +42,7 @@ jobs:
outputs:
go: ${{ steps.filter.outputs.go }}
charts: ${{ steps.filter.outputs.charts }}
baseimage: ${{ steps.filter.outputs.baseimage }}
steps:
@ -64,6 +66,8 @@ jobs:
- 'charts/ingress-nginx/Chart.yaml'
- 'charts/ingress-nginx/**/*'
- 'NGINX_BASE'
baseimage:
- 'images/nginx-1.25/**'
test-go:
runs-on: ubuntu-latest
@ -89,8 +93,10 @@ jobs:
runs-on: ubuntu-latest
needs: changes
if: |
(needs.changes.outputs.go == 'true') || (needs.changes.outputs.charts == 'true')
(needs.changes.outputs.go == 'true') || (needs.changes.outputs.charts == 'true') || (needs.changes.outputs.baseimage == 'true')
env:
PLATFORMS: linux/amd64
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@ -119,7 +125,14 @@ jobs:
curl -LO https://dl.k8s.io/release/v1.27.3/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
- name: Build NGINX Base image
if: |
needs.changes.outputs.baseimage == 'true'
run: |
export TAG=$(cat images/nginx-1.25/TAG)
cd images/nginx-1.25/rootfs && docker buildx build --platform=${{ env.PLATFORMS }} --load -t gcr.io/k8s-staging-ingress-nginx/nginx-1.25:${TAG} .
- name: Build images
env:
TAG: 1.0.0-dev
@ -127,7 +140,8 @@ jobs:
REGISTRY: ingress-controller
run: |
echo "building images..."
make clean-image build image image-chroot
export TAGNGINX=$(cat images/nginx-1.25/TAG)
make BASE_IMAGE=gcr.io/k8s-staging-ingress-nginx/nginx-1.25:${TAGNGINX} clean-image build image image-chroot
make -C test/e2e-image image
echo "creating images cache..."
@ -150,11 +164,11 @@ jobs:
- changes
- build
if: |
(needs.changes.outputs.charts == 'true')
(needs.changes.outputs.charts == 'true') || (needs.changes.outputs.baseimage == 'true')
strategy:
matrix:
k8s: [v1.25.11, v1.26.6, v1.27.3, v1.28.0, v1.29.0]
k8s: [v1.26.6, v1.27.3, v1.28.0, v1.29.0]
steps:
- name: Checkout
@ -222,6 +236,7 @@ jobs:
KIND_CLUSTER_NAME: kind
SKIP_CLUSTER_CREATION: true
SKIP_IMAGE_CREATION: true
SKIP_INGRESS_IMAGE_CREATION: true
run: |
kind get kubeconfig > $HOME/.kube/kind-config-kind
make kind-e2e-chart-tests
@ -232,10 +247,10 @@ jobs:
- changes
- build
if: |
(needs.changes.outputs.go == 'true')
(needs.changes.outputs.go == 'true') || (needs.changes.outputs.baseimage == 'true')
strategy:
matrix:
k8s: [v1.25.11, v1.26.6, v1.27.3, v1.28.0, v1.29.0]
k8s: [v1.26.6, v1.27.3, v1.28.0, v1.29.0]
uses: ./.github/workflows/zz-tmpl-k8s-e2e.yaml
with:
k8s-version: ${{ matrix.k8s }}
@ -246,10 +261,10 @@ jobs:
- changes
- build
if: |
(needs.changes.outputs.go == 'true')
(needs.changes.outputs.go == 'true') || (needs.changes.outputs.baseimage == 'true')
strategy:
matrix:
k8s: [v1.25.11, v1.26.6, v1.27.3, v1.28.0, v1.29.0]
k8s: [v1.26.6, v1.27.3, v1.28.0, v1.29.0]
uses: ./.github/workflows/zz-tmpl-k8s-e2e.yaml
with:
k8s-version: ${{ matrix.k8s }}
@ -261,10 +276,10 @@ jobs:
- changes
- build
if: |
(needs.changes.outputs.go == 'true')
(needs.changes.outputs.go == 'true') || (needs.changes.outputs.baseimage == 'true')
strategy:
matrix:
k8s: [v1.25.11, v1.26.6, v1.27.3, v1.28.0, v1.29.0]
k8s: [v1.26.6, v1.27.3, v1.28.0, v1.29.0]
uses: ./.github/workflows/zz-tmpl-k8s-e2e.yaml
with:
k8s-version: ${{ matrix.k8s }}