Move image build to CI
This commit is contained in:
parent
234e333d6f
commit
f40668a641
5 changed files with 27 additions and 13 deletions
30
.github/workflows/ci.yaml
vendored
30
.github/workflows/ci.yaml
vendored
|
@ -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..."
|
||||
|
@ -154,7 +168,7 @@ jobs:
|
|||
|
||||
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
|
||||
|
@ -235,7 +249,7 @@ jobs:
|
|||
(needs.changes.outputs.go == '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 }}
|
||||
|
@ -249,7 +263,7 @@ jobs:
|
|||
(needs.changes.outputs.go == '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 }}
|
||||
|
@ -264,7 +278,7 @@ jobs:
|
|||
(needs.changes.outputs.go == '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 }}
|
||||
|
|
2
.github/workflows/nginx125.yaml
vendored
2
.github/workflows/nginx125.yaml
vendored
|
@ -3,7 +3,7 @@ name: NGINX v1.25 Image
|
|||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "*"
|
||||
- "kdsajdoiasjdoasijads"
|
||||
paths:
|
||||
- 'images/nginx-1.25/**'
|
||||
push:
|
||||
|
|
3
.github/workflows/zz-tmpl-k8s-e2e.yaml
vendored
3
.github/workflows/zz-tmpl-k8s-e2e.yaml
vendored
|
@ -41,7 +41,8 @@ jobs:
|
|||
env:
|
||||
KIND_CLUSTER_NAME: kind
|
||||
SKIP_CLUSTER_CREATION: true
|
||||
SKIP_IMAGE_CREATION: true
|
||||
SKIP_INGRESS_IMAGE_CREATION: true
|
||||
SKIP_E2E_IMAGE_CREATION: true
|
||||
ENABLE_VALIDATIONS: ${{ inputs.variation == 'VALIDATIONS' }}
|
||||
IS_CHROOT: ${{ inputs.variation == 'CHROOT' }}
|
||||
run: |
|
||||
|
|
|
@ -22,7 +22,7 @@ INIT_BUILDX=$(DIR)/../../hack/init-buildx.sh
|
|||
|
||||
# 0.0.0 shouldn't clobber any released builds
|
||||
SHORT_SHA ?=$(shell git rev-parse --short HEAD)
|
||||
TAG ?=v$(shell date +%Y%m%d)-$(SHORT_SHA)
|
||||
TAG ?=$(shell cat TAG)
|
||||
|
||||
REGISTRY ?= gcr.io/k8s-staging-ingress-nginx
|
||||
|
||||
|
|
|
@ -1501,8 +1501,7 @@ func httpsListener(addresses []string, co string, tc *config.TemplateConfig) []s
|
|||
}
|
||||
}
|
||||
|
||||
lo = append(lo, co, "ssl")
|
||||
lo = append(lo, ";")
|
||||
lo = append(lo, co, "ssl;")
|
||||
|
||||
out = append(out, strings.Join(lo, " "))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue