Simplify images Makefiles
This commit is contained in:
parent
2f0cbae629
commit
388fc748dd
36 changed files with 115 additions and 524 deletions
25
.github/workflows/images.yaml
vendored
25
.github/workflows/images.yaml
vendored
|
@ -14,7 +14,8 @@ on:
|
||||||
- 'images/**'
|
- 'images/**'
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PLATFORMS: linux/amd64
|
PLATFORMS: linux/amd64
|
||||||
|
@ -29,7 +30,7 @@ jobs:
|
||||||
custom-error-pages: ${{ steps.filter.outputs.custom-error-pages }}
|
custom-error-pages: ${{ steps.filter.outputs.custom-error-pages }}
|
||||||
cfssl: ${{ steps.filter.outputs.cfssl }}
|
cfssl: ${{ steps.filter.outputs.cfssl }}
|
||||||
fastcgi-helloserver: ${{ steps.filter.outputs.fastcgi-helloserver }}
|
fastcgi-helloserver: ${{ steps.filter.outputs.fastcgi-helloserver }}
|
||||||
echo: ${{ steps.filter.outputs.echo }}
|
e2e-test-echo: ${{ steps.filter.outputs.e2e-test-echo }}
|
||||||
go-grpc-greeter-server: ${{ steps.filter.outputs.go-grpc-greeter-server }}
|
go-grpc-greeter-server: ${{ steps.filter.outputs.go-grpc-greeter-server }}
|
||||||
httpbun: ${{ steps.filter.outputs.httpbun }}
|
httpbun: ${{ steps.filter.outputs.httpbun }}
|
||||||
kube-webhook-certgen: ${{ steps.filter.outputs.kube-webhook-certgen }}
|
kube-webhook-certgen: ${{ steps.filter.outputs.kube-webhook-certgen }}
|
||||||
|
@ -50,8 +51,8 @@ jobs:
|
||||||
- 'images/cfssl/**'
|
- 'images/cfssl/**'
|
||||||
fastcgi-helloserver:
|
fastcgi-helloserver:
|
||||||
- 'images/fastcgi-helloserver/**'
|
- 'images/fastcgi-helloserver/**'
|
||||||
echo:
|
e2e-test-echo:
|
||||||
- 'images/echo/**'
|
- 'images/e2e-test-echo/**'
|
||||||
go-grpc-greeter-server:
|
go-grpc-greeter-server:
|
||||||
- 'images/go-grpc-greeter-server/**'
|
- 'images/go-grpc-greeter-server/**'
|
||||||
httpbun:
|
httpbun:
|
||||||
|
@ -80,13 +81,13 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: custom-error-pages
|
name: custom-error-pages
|
||||||
|
|
||||||
echo:
|
e2e-test-echo:
|
||||||
needs: changes
|
needs: changes
|
||||||
if: |
|
if: |
|
||||||
(needs.changes.outputs.echo == 'true')
|
(needs.changes.outputs.e2e-test-echo == 'true')
|
||||||
uses: ./.github/workflows/zz-tmpl-images.yaml
|
uses: ./.github/workflows/zz-tmpl-images.yaml
|
||||||
with:
|
with:
|
||||||
name: echo
|
name: e2e-test-echo
|
||||||
|
|
||||||
ext-auth-example-authsvc:
|
ext-auth-example-authsvc:
|
||||||
needs: changes
|
needs: changes
|
||||||
|
@ -96,13 +97,13 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: ext-auth-example-authsvc
|
name: ext-auth-example-authsvc
|
||||||
|
|
||||||
fastcfgi-helloserver:
|
fastcgi-helloserver:
|
||||||
needs: changes
|
needs: changes
|
||||||
if: |
|
if: |
|
||||||
(needs.changes.outputs.fastcfgi-helloserver == 'true')
|
(needs.changes.outputs.fastcgi-helloserver == 'true')
|
||||||
uses: ./.github/workflows/zz-tmpl-images.yaml
|
uses: ./.github/workflows/zz-tmpl-images.yaml
|
||||||
with:
|
with:
|
||||||
name: fastcfgi-helloserver
|
name: fastcgi-helloserver
|
||||||
|
|
||||||
go-grpc-greeter-server:
|
go-grpc-greeter-server:
|
||||||
needs: changes
|
needs: changes
|
||||||
|
@ -139,14 +140,14 @@ jobs:
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: image build
|
- name: image build
|
||||||
run: |
|
run: |
|
||||||
cd images/kube-webhook-certgen && make build
|
cd images/ && make NAME=kube-webhook-certgen build
|
||||||
- name: Create Kubernetes cluster
|
- name: Create Kubernetes cluster
|
||||||
id: kind
|
id: kind
|
||||||
run: |
|
run: |
|
||||||
kind create cluster --image=kindest/node:${{ matrix.k8s }}
|
kind create cluster --image=kindest/node:${{ matrix.k8s }}
|
||||||
- name: image test
|
- name: image test
|
||||||
run: |
|
run: |
|
||||||
cd images/kube-webhook-certgen && make test test-e2e
|
cd images/ && make NAME=kube-webhook-certgen test test-e2e
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
1
.github/workflows/junit-reports.yaml
vendored
1
.github/workflows/junit-reports.yaml
vendored
|
@ -15,3 +15,4 @@ jobs:
|
||||||
name: JEST Tests $1 # Name of the check run which will be created
|
name: JEST Tests $1 # Name of the check run which will be created
|
||||||
path: 'report*.xml' # Path to test results (inside artifact .zip)
|
path: 'report*.xml' # Path to test results (inside artifact .zip)
|
||||||
reporter: jest-junit # Format of test results
|
reporter: jest-junit # Format of test results
|
||||||
|
fail-on-empty: 'true'
|
||||||
|
|
54
.github/workflows/zz-tmpl-images.yaml
vendored
54
.github/workflows/zz-tmpl-images.yaml
vendored
|
@ -18,12 +18,33 @@ env:
|
||||||
PLATFORMS: ${{ inputs.platforms-test }}
|
PLATFORMS: ${{ inputs.platforms-test }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
image-build:
|
changestag:
|
||||||
name: Build ${{ inputs.name }}
|
permissions:
|
||||||
|
contents: read # for dorny/paths-filter to fetch a list of changed files
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
tag: ${{ steps.filter.outputs.tag }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
filters: |
|
||||||
|
tag:
|
||||||
|
- 'images/**/TAG'
|
||||||
|
|
||||||
|
image-build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -31,6 +52,31 @@ jobs:
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cd images/${{ inputs.name }} && make build
|
cd images/ && make NAME=${{ inputs.name }} build
|
||||||
|
|
||||||
|
image-push:
|
||||||
|
name: Push
|
||||||
|
needs: changestag
|
||||||
|
if: |
|
||||||
|
(github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'kubernetes/ingress-nginx' && needs.changestag.outputs.tag == 'true')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
env:
|
||||||
|
PLATFORMS: ${{ inputs.platforms-publish }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Push
|
||||||
|
run: |
|
||||||
|
cd images/ && make REGISTRY=ghcr.io/kubernetes/ingress-nginx NAME=${{ inputs.name }} push
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright 2021 The Kubernetes Authors. All rights reserved.
|
# Copyright 2024 The Kubernetes Authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
|
@ -14,17 +14,23 @@
|
||||||
|
|
||||||
.DEFAULT_GOAL:=build
|
.DEFAULT_GOAL:=build
|
||||||
|
|
||||||
|
# set default shell
|
||||||
SHELL=/bin/bash -o pipefail -o errexit
|
SHELL=/bin/bash -o pipefail -o errexit
|
||||||
|
|
||||||
DIR:=$(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
|
DIR:=$(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
|
||||||
INIT_BUILDX=$(DIR)/../../hack/init-buildx.sh
|
INIT_BUILDX=$(DIR)/../hack/init-buildx.sh
|
||||||
|
|
||||||
SHORT_SHA ?=$(shell git rev-parse --short HEAD)
|
|
||||||
TAG ?=v$(shell date +%Y%m%d)-$(SHORT_SHA)
|
BASE_IMAGE = $(shell cat $(DIR)/../NGINX_BASE)
|
||||||
|
|
||||||
REGISTRY ?= local
|
REGISTRY ?= local
|
||||||
|
NAME ?=
|
||||||
|
|
||||||
|
IMAGE = $(REGISTRY)/$(NAME)
|
||||||
|
TAG ?= $(shell cat $(NAME)/TAG)
|
||||||
|
|
||||||
|
EXTRAARGS ?= $(shell cat $(NAME)/EXTRAARGS)
|
||||||
|
|
||||||
IMAGE = $(REGISTRY)/kube-webhook-certgen
|
|
||||||
|
|
||||||
# required to enable buildx
|
# required to enable buildx
|
||||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||||
|
@ -34,17 +40,33 @@ PLATFORMS?=linux/amd64,linux/arm,linux/arm64,linux/s390x
|
||||||
OUTPUT=
|
OUTPUT=
|
||||||
PROGRESS=plain
|
PROGRESS=plain
|
||||||
|
|
||||||
build: ensure-buildx
|
|
||||||
|
precheck:
|
||||||
|
ifndef NAME
|
||||||
|
$(error NAME variable is required)
|
||||||
|
endif
|
||||||
|
|
||||||
|
build: precheck ensure-buildx
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
|
--label=org.opencontainers.image.source=https://github.com/kubernetes/ingress-nginx \
|
||||||
|
--label=org.opencontainers.image.licenses=Apache-2.0 \
|
||||||
|
--label=org.opencontainers.image.description="Ingress NGINX $(NAME) image" \
|
||||||
|
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
|
||||||
--platform=${PLATFORMS} $(OUTPUT) \
|
--platform=${PLATFORMS} $(OUTPUT) \
|
||||||
--progress=$(PROGRESS) \
|
--progress=$(PROGRESS) \
|
||||||
--pull \
|
--pull $(EXTRAARGS) \
|
||||||
-t $(IMAGE):$(TAG) rootfs
|
-t $(IMAGE):$(TAG) $(NAME)/rootfs
|
||||||
|
|
||||||
# push the cross built image
|
# push the cross built image
|
||||||
push: OUTPUT=--push
|
push: OUTPUT=--push
|
||||||
push: build
|
push: build
|
||||||
|
|
||||||
|
test: precheck
|
||||||
|
cd $(NAME)/rootfs && go test ./...
|
||||||
|
|
||||||
|
test-e2e: precheck
|
||||||
|
cd $(NAME) && ./hack/e2e.sh
|
||||||
|
|
||||||
# enable buildx
|
# enable buildx
|
||||||
ensure-buildx:
|
ensure-buildx:
|
||||||
# this is required for cloudbuild
|
# this is required for cloudbuild
|
||||||
|
@ -55,10 +77,4 @@ else
|
||||||
endif
|
endif
|
||||||
@echo "done"
|
@echo "done"
|
||||||
|
|
||||||
test:
|
.PHONY: build push ensure-buildx test test-e2e precheck
|
||||||
cd rootfs && go test ./...
|
|
||||||
|
|
||||||
test-e2e:
|
|
||||||
./hack/e2e.sh
|
|
||||||
|
|
||||||
.PHONY: build push ensure-buildx test test-e2e
|
|
|
@ -1,57 +0,0 @@
|
||||||
# Copyright 2020 The Kubernetes Authors.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
# set default shell
|
|
||||||
SHELL=/bin/bash -o pipefail -o errexit
|
|
||||||
|
|
||||||
DIR:=$(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
|
|
||||||
INIT_BUILDX=$(DIR)/../../hack/init-buildx.sh
|
|
||||||
|
|
||||||
SHORT_SHA ?=$(shell git rev-parse --short HEAD)
|
|
||||||
TAG ?=v$(shell date +%Y%m%d)-$(SHORT_SHA)
|
|
||||||
|
|
||||||
REGISTRY ?= local
|
|
||||||
|
|
||||||
IMAGE = $(REGISTRY)/e2e-test-cfssl
|
|
||||||
|
|
||||||
# required to enable buildx
|
|
||||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
|
||||||
|
|
||||||
# build with buildx
|
|
||||||
PLATFORMS?=linux/amd64,linux/arm,linux/arm64,linux/s390x
|
|
||||||
OUTPUT=
|
|
||||||
PROGRESS=plain
|
|
||||||
|
|
||||||
build: ensure-buildx
|
|
||||||
docker buildx build \
|
|
||||||
--platform=${PLATFORMS} $(OUTPUT) \
|
|
||||||
--progress=$(PROGRESS) \
|
|
||||||
--pull \
|
|
||||||
-t $(IMAGE):$(TAG) rootfs
|
|
||||||
|
|
||||||
# push the cross built image
|
|
||||||
push: OUTPUT=--push
|
|
||||||
push: build
|
|
||||||
|
|
||||||
# enable buildx
|
|
||||||
ensure-buildx:
|
|
||||||
# this is required for cloudbuild
|
|
||||||
ifeq ("$(wildcard $(INIT_BUILDX))","")
|
|
||||||
@curl -sSL https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/hack/init-buildx.sh | bash
|
|
||||||
else
|
|
||||||
@exec $(INIT_BUILDX)
|
|
||||||
endif
|
|
||||||
@echo "done"
|
|
||||||
|
|
||||||
.PHONY: build push ensure-buildx
|
|
1
images/cfssl/TAG
Normal file
1
images/cfssl/TAG
Normal file
|
@ -0,0 +1 @@
|
||||||
|
v0.0.1
|
|
@ -14,4 +14,4 @@ steps:
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
gcloud auth configure-docker \
|
gcloud auth configure-docker \
|
||||||
&& cd images/cfssl && make push
|
&& cd images && make NAME=cfssl push
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
FROM alpine:3.19.0
|
FROM alpine:3.19.0
|
||||||
# BLA
|
|
||||||
|
|
||||||
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
|
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
|
||||||
RUN apk update \
|
RUN apk update \
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
# Copyright 2021 The Kubernetes Authors.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
# Container image for nginx-errors.
|
|
||||||
|
|
||||||
# set default shell
|
|
||||||
SHELL=/bin/bash -o pipefail -o errexit
|
|
||||||
|
|
||||||
DIR:=$(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
|
|
||||||
INIT_BUILDX=$(DIR)/../../hack/init-buildx.sh
|
|
||||||
|
|
||||||
SHORT_SHA ?=$(shell git rev-parse --short HEAD)
|
|
||||||
TAG ?=v$(shell date +%Y%m%d)-$(SHORT_SHA)
|
|
||||||
|
|
||||||
REGISTRY ?= local
|
|
||||||
|
|
||||||
IMAGE = $(REGISTRY)/nginx-errors
|
|
||||||
|
|
||||||
# required to enable buildx
|
|
||||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
|
||||||
|
|
||||||
# build with buildx
|
|
||||||
PLATFORMS?=linux/amd64,linux/arm,linux/arm64,linux/s390x
|
|
||||||
OUTPUT=
|
|
||||||
PROGRESS=plain
|
|
||||||
|
|
||||||
build: ensure-buildx
|
|
||||||
docker buildx build \
|
|
||||||
--platform=${PLATFORMS} $(OUTPUT) \
|
|
||||||
--progress=$(PROGRESS) \
|
|
||||||
--pull \
|
|
||||||
-t $(IMAGE):$(TAG) rootfs
|
|
||||||
|
|
||||||
# push the cross built image
|
|
||||||
push: OUTPUT=--push
|
|
||||||
push: build
|
|
||||||
|
|
||||||
# enable buildx
|
|
||||||
ensure-buildx:
|
|
||||||
# this is required for cloudbuild
|
|
||||||
ifeq ("$(wildcard $(INIT_BUILDX))","")
|
|
||||||
@curl -sSL https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/hack/init-buildx.sh | bash
|
|
||||||
else
|
|
||||||
@exec $(INIT_BUILDX)
|
|
||||||
endif
|
|
||||||
@echo "done"
|
|
||||||
|
|
||||||
.PHONY: build push ensure-buildx
|
|
1
images/custom-error-pages/TAG
Normal file
1
images/custom-error-pages/TAG
Normal file
|
@ -0,0 +1 @@
|
||||||
|
v0.0.1
|
|
@ -14,4 +14,4 @@ steps:
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
gcloud auth configure-docker \
|
gcloud auth configure-docker \
|
||||||
&& cd images/custom-error-pages && make push
|
&& cd images/ && make NAME=custom-error-pages push
|
||||||
|
|
1
images/e2e-test-echo/EXTRAARGS
Normal file
1
images/e2e-test-echo/EXTRAARGS
Normal file
|
@ -0,0 +1 @@
|
||||||
|
--build-arg LUAROCKS_VERSION=3.8.0 --build-arg LUAROCKS_SHA=ab6612ca9ab87c6984871d2712d05525775e8b50172701a0a1cabddf76de2be7
|
1
images/e2e-test-echo/TAG
Normal file
1
images/e2e-test-echo/TAG
Normal file
|
@ -0,0 +1 @@
|
||||||
|
v0.0.1
|
|
@ -1,61 +0,0 @@
|
||||||
# Copyright 2020 The Kubernetes Authors. All rights reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
# set default shell
|
|
||||||
SHELL=/bin/bash -o pipefail -o errexit
|
|
||||||
|
|
||||||
DIR:=$(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
|
|
||||||
INIT_BUILDX=$(DIR)/../../hack/init-buildx.sh
|
|
||||||
|
|
||||||
SHORT_SHA ?=$(shell git rev-parse --short HEAD)
|
|
||||||
TAG ?=v$(shell date +%Y%m%d)-$(SHORT_SHA)
|
|
||||||
|
|
||||||
REGISTRY ?= local
|
|
||||||
|
|
||||||
IMAGE = $(REGISTRY)/e2e-test-echo
|
|
||||||
|
|
||||||
# required to enable buildx
|
|
||||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
|
||||||
|
|
||||||
BASE_IMAGE = $(shell cat $(DIR)/../../NGINX_BASE)
|
|
||||||
# build with buildx
|
|
||||||
PLATFORMS?=linux/amd64
|
|
||||||
OUTPUT=
|
|
||||||
PROGRESS=plain
|
|
||||||
|
|
||||||
build: ensure-buildx
|
|
||||||
docker buildx build \
|
|
||||||
--platform=${PLATFORMS} $(OUTPUT) \
|
|
||||||
--progress=$(PROGRESS) \
|
|
||||||
--pull \
|
|
||||||
--build-arg BASE_IMAGE=${BASE_IMAGE} \
|
|
||||||
--build-arg LUAROCKS_VERSION=3.8.0 \
|
|
||||||
--build-arg LUAROCKS_SHA=ab6612ca9ab87c6984871d2712d05525775e8b50172701a0a1cabddf76de2be7 \
|
|
||||||
-t $(IMAGE):$(TAG) rootfs
|
|
||||||
|
|
||||||
# push the cross built image
|
|
||||||
push: OUTPUT=--push
|
|
||||||
push: build
|
|
||||||
|
|
||||||
# enable buildx
|
|
||||||
ensure-buildx:
|
|
||||||
# this is required for cloudbuild
|
|
||||||
ifeq ("$(wildcard $(INIT_BUILDX))","")
|
|
||||||
@curl -sSL https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/hack/init-buildx.sh | bash
|
|
||||||
else
|
|
||||||
@exec $(INIT_BUILDX)
|
|
||||||
endif
|
|
||||||
@echo "done"
|
|
||||||
|
|
||||||
.PHONY: build push ensure-buildx
|
|
|
@ -1,17 +0,0 @@
|
||||||
timeout: 1200s
|
|
||||||
options:
|
|
||||||
substitution_option: ALLOW_LOOSE
|
|
||||||
steps:
|
|
||||||
- name: gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20211118-2f2d816b90
|
|
||||||
entrypoint: bash
|
|
||||||
env:
|
|
||||||
- DOCKER_CLI_EXPERIMENTAL=enabled
|
|
||||||
- REGISTRY=gcr.io/k8s-staging-ingress-nginx
|
|
||||||
# default cloudbuild has HOME=/builder/home and docker buildx is in /root/.docker/cli-plugins/docker-buildx
|
|
||||||
# set the home to /root explicitly to if using docker buildx
|
|
||||||
- HOME=/root
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
gcloud auth configure-docker \
|
|
||||||
&& cd images/echo && make push
|
|
|
@ -1,57 +0,0 @@
|
||||||
# Copyright 2022 The Kubernetes Authors. All rights reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
# set default shell
|
|
||||||
SHELL=/bin/bash -o pipefail -o errexit
|
|
||||||
|
|
||||||
DIR:=$(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
|
|
||||||
INIT_BUILDX=$(DIR)/../../hack/init-buildx.sh
|
|
||||||
|
|
||||||
SHORT_SHA ?=$(shell git rev-parse --short HEAD)
|
|
||||||
TAG ?=v$(shell date +%Y%m%d)-$(SHORT_SHA)
|
|
||||||
|
|
||||||
REGISTRY ?= local
|
|
||||||
|
|
||||||
IMAGE = $(REGISTRY)/ext-auth-example-authsvc
|
|
||||||
|
|
||||||
# required to enable buildx
|
|
||||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
|
||||||
|
|
||||||
# build with buildx
|
|
||||||
PLATFORMS?=linux/amd64,linux/arm,linux/arm64,linux/s390x
|
|
||||||
OUTPUT=
|
|
||||||
PROGRESS=plain
|
|
||||||
|
|
||||||
build: ensure-buildx
|
|
||||||
docker buildx build \
|
|
||||||
--platform=${PLATFORMS} $(OUTPUT) \
|
|
||||||
--progress=$(PROGRESS) \
|
|
||||||
--pull \
|
|
||||||
-t $(IMAGE):$(TAG) rootfs
|
|
||||||
|
|
||||||
# push the cross built image
|
|
||||||
push: OUTPUT=--push
|
|
||||||
push: build
|
|
||||||
|
|
||||||
# enable buildx
|
|
||||||
ensure-buildx:
|
|
||||||
# this is required for cloudbuild
|
|
||||||
ifeq ("$(wildcard $(INIT_BUILDX))","")
|
|
||||||
@curl -sSL https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/hack/init-buildx.sh | bash
|
|
||||||
else
|
|
||||||
@exec $(INIT_BUILDX)
|
|
||||||
endif
|
|
||||||
@echo "done"
|
|
||||||
|
|
||||||
.PHONY: build push ensure-buildx
|
|
1
images/ext-auth-example-authsvc/TAG
Normal file
1
images/ext-auth-example-authsvc/TAG
Normal file
|
@ -0,0 +1 @@
|
||||||
|
v0.0.1
|
|
@ -16,4 +16,4 @@ steps:
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
gcloud auth configure-docker \
|
gcloud auth configure-docker \
|
||||||
&& cd images/ext-auth-example-authsvc && make push
|
&& cd images/ && make NAME=ext-auth-example-authsvc push
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
# Copyright 2020 The Kubernetes Authors.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
# Docker image for e2e testing.
|
|
||||||
|
|
||||||
# set default shell
|
|
||||||
SHELL=/bin/bash -o pipefail -o errexit
|
|
||||||
|
|
||||||
DIR:=$(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
|
|
||||||
INIT_BUILDX=$(DIR)/../../hack/init-buildx.sh
|
|
||||||
|
|
||||||
SHORT_SHA ?=$(shell git rev-parse --short HEAD)
|
|
||||||
TAG ?=v$(shell date +%Y%m%d)-$(SHORT_SHA)
|
|
||||||
|
|
||||||
REGISTRY ?= local
|
|
||||||
|
|
||||||
IMAGE = $(REGISTRY)/e2e-test-fastcgi-helloserver
|
|
||||||
|
|
||||||
# required to enable buildx
|
|
||||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
|
||||||
|
|
||||||
# build with buildx
|
|
||||||
PLATFORMS?=linux/amd64,linux/arm,linux/arm64
|
|
||||||
OUTPUT=
|
|
||||||
PROGRESS=plain
|
|
||||||
|
|
||||||
build: ensure-buildx
|
|
||||||
docker buildx build \
|
|
||||||
--platform=${PLATFORMS} $(OUTPUT) \
|
|
||||||
--progress=$(PROGRESS) \
|
|
||||||
--pull \
|
|
||||||
-t $(IMAGE):$(TAG) rootfs
|
|
||||||
|
|
||||||
# push the cross built image
|
|
||||||
push: OUTPUT=--push
|
|
||||||
push: build
|
|
||||||
|
|
||||||
# enable buildx
|
|
||||||
ensure-buildx:
|
|
||||||
# this is required for cloudbuild
|
|
||||||
ifeq ("$(wildcard $(INIT_BUILDX))","")
|
|
||||||
@curl -sSL https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/hack/init-buildx.sh | bash
|
|
||||||
else
|
|
||||||
@exec $(INIT_BUILDX)
|
|
||||||
endif
|
|
||||||
@echo "done"
|
|
||||||
|
|
||||||
.PHONY: build push ensure-buildx
|
|
1
images/fastcgi-helloserver/TAG
Normal file
1
images/fastcgi-helloserver/TAG
Normal file
|
@ -0,0 +1 @@
|
||||||
|
v0.0.1
|
|
@ -14,5 +14,5 @@ steps:
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
gcloud auth configure-docker \
|
gcloud auth configure-docker \
|
||||||
&& cd images/fastcgi-helloserver && make push
|
&& cd images/ && make NAME=fastcgi-helloserver push
|
||||||
|
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
# Copyright 2021 The Kubernetes Authors. All rights reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
# set default shell
|
|
||||||
SHELL=/bin/bash -o pipefail -o errexit
|
|
||||||
|
|
||||||
DIR:=$(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
|
|
||||||
INIT_BUILDX=$(DIR)/../../hack/init-buildx.sh
|
|
||||||
|
|
||||||
SHORT_SHA ?=$(shell git rev-parse --short HEAD)
|
|
||||||
TAG ?=v$(shell date +%Y%m%d)-$(SHORT_SHA)
|
|
||||||
|
|
||||||
REGISTRY ?= local
|
|
||||||
|
|
||||||
IMAGE = $(REGISTRY)/go-grpc-greeter-server
|
|
||||||
|
|
||||||
# required to enable buildx
|
|
||||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
|
||||||
|
|
||||||
# build with buildx
|
|
||||||
PLATFORMS?=linux/amd64,linux/arm,linux/arm64,linux/s390x
|
|
||||||
OUTPUT=
|
|
||||||
PROGRESS=plain
|
|
||||||
|
|
||||||
build: ensure-buildx
|
|
||||||
docker buildx build \
|
|
||||||
--platform=${PLATFORMS} $(OUTPUT) \
|
|
||||||
--progress=$(PROGRESS) \
|
|
||||||
--pull \
|
|
||||||
-t $(IMAGE):$(TAG) rootfs
|
|
||||||
|
|
||||||
# push the cross built image
|
|
||||||
push: OUTPUT=--push
|
|
||||||
push: build
|
|
||||||
|
|
||||||
# enable buildx
|
|
||||||
ensure-buildx:
|
|
||||||
# this is required for cloudbuild
|
|
||||||
ifeq ("$(wildcard $(INIT_BUILDX))","")
|
|
||||||
@curl -sSL https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/hack/init-buildx.sh | bash
|
|
||||||
else
|
|
||||||
@exec $(INIT_BUILDX)
|
|
||||||
endif
|
|
||||||
@echo "done"
|
|
||||||
|
|
||||||
.PHONY: build push ensure-buildx
|
|
1
images/go-grpc-greeter-server/TAG
Normal file
1
images/go-grpc-greeter-server/TAG
Normal file
|
@ -0,0 +1 @@
|
||||||
|
v0.0.1
|
|
@ -16,4 +16,4 @@ steps:
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
gcloud auth configure-docker \
|
gcloud auth configure-docker \
|
||||||
&& cd images/go-grpc-greeter-server && make push
|
&& cd images/ && make NAME=go-grpc-greeter-server push
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
# Copyright 2020 The Kubernetes Authors. All rights reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
# set default shell
|
|
||||||
SHELL=/bin/bash -o pipefail -o errexit
|
|
||||||
|
|
||||||
DIR:=$(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
|
|
||||||
INIT_BUILDX=$(DIR)/../../hack/init-buildx.sh
|
|
||||||
|
|
||||||
SHORT_SHA ?=$(shell git rev-parse --short HEAD)
|
|
||||||
TAG ?=v$(shell date +%Y%m%d)-$(SHORT_SHA)
|
|
||||||
|
|
||||||
REGISTRY ?= local
|
|
||||||
|
|
||||||
IMAGE = $(REGISTRY)/e2e-test-httpbun
|
|
||||||
|
|
||||||
# required to enable buildx
|
|
||||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
|
||||||
|
|
||||||
# build with buildx
|
|
||||||
PLATFORMS?=linux/amd64,linux/arm,linux/arm64,linux/s390x
|
|
||||||
OUTPUT=
|
|
||||||
PROGRESS=plain
|
|
||||||
|
|
||||||
build: ensure-buildx
|
|
||||||
docker buildx build \
|
|
||||||
--platform=${PLATFORMS} $(OUTPUT) \
|
|
||||||
--progress=$(PROGRESS) \
|
|
||||||
--pull \
|
|
||||||
-t $(IMAGE):$(TAG) rootfs
|
|
||||||
|
|
||||||
# push the cross built image
|
|
||||||
push: OUTPUT=--push
|
|
||||||
push: build
|
|
||||||
|
|
||||||
# enable buildx
|
|
||||||
ensure-buildx:
|
|
||||||
# this is required for cloudbuild
|
|
||||||
ifeq ("$(wildcard $(INIT_BUILDX))","")
|
|
||||||
@curl -sSL https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/hack/init-buildx.sh | bash
|
|
||||||
else
|
|
||||||
@exec $(INIT_BUILDX)
|
|
||||||
endif
|
|
||||||
@echo "done"
|
|
||||||
|
|
||||||
.PHONY: build push ensure-buildx
|
|
1
images/httpbun/TAG
Normal file
1
images/httpbun/TAG
Normal file
|
@ -0,0 +1 @@
|
||||||
|
v0.0.1
|
|
@ -16,4 +16,4 @@ steps:
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
gcloud auth configure-docker \
|
gcloud auth configure-docker \
|
||||||
&& cd images/httpbun && make push
|
&& cd images/ && make NAME=httpbun push
|
||||||
|
|
1
images/kube-webhook-certgen/TAG
Normal file
1
images/kube-webhook-certgen/TAG
Normal file
|
@ -0,0 +1 @@
|
||||||
|
v0.0.1
|
|
@ -29,4 +29,4 @@ steps:
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
gcloud auth configure-docker \
|
gcloud auth configure-docker \
|
||||||
&& cd images/kube-webhook-certgen && make push
|
&& cd images/ && make NAME=kube-webhook-certgen push
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
# Copyright 2021 The Kubernetes Authors. All rights reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
.DEFAULT_GOAL:=build
|
|
||||||
|
|
||||||
# set default shell
|
|
||||||
SHELL=/bin/bash -o pipefail -o errexit
|
|
||||||
|
|
||||||
DIR:=$(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
|
|
||||||
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)
|
|
||||||
|
|
||||||
REGISTRY ?= gcr.io/k8s-staging-ingress-nginx
|
|
||||||
|
|
||||||
IMAGE = $(REGISTRY)/opentelemetry
|
|
||||||
|
|
||||||
# required to enable buildx
|
|
||||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
|
||||||
|
|
||||||
# build with buildx
|
|
||||||
PLATFORMS?=linux/amd64,linux/arm,linux/arm64,linux/s390x
|
|
||||||
OUTPUT=
|
|
||||||
PROGRESS=plain
|
|
||||||
build: ensure-buildx
|
|
||||||
docker buildx build \
|
|
||||||
--platform=${PLATFORMS} $(OUTPUT) \
|
|
||||||
--progress=$(PROGRESS) \
|
|
||||||
--pull \
|
|
||||||
--tag $(IMAGE):$(TAG) rootfs
|
|
||||||
|
|
||||||
# push the cross built image
|
|
||||||
push: OUTPUT=--push
|
|
||||||
push: build
|
|
||||||
|
|
||||||
# enable buildx
|
|
||||||
ensure-buildx:
|
|
||||||
# this is required for cloudbuild
|
|
||||||
ifeq ("$(wildcard $(INIT_BUILDX))","")
|
|
||||||
@curl -sSL https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/hack/init-buildx.sh | bash
|
|
||||||
else
|
|
||||||
@exec $(INIT_BUILDX)
|
|
||||||
endif
|
|
||||||
@echo "done"
|
|
||||||
|
|
||||||
.PHONY: build push ensure-buildx
|
|
1
images/opentelemetry/TAG
Normal file
1
images/opentelemetry/TAG
Normal file
|
@ -0,0 +1 @@
|
||||||
|
v0.0.1
|
|
@ -16,4 +16,4 @@ steps:
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
gcloud auth configure-docker \
|
gcloud auth configure-docker \
|
||||||
&& cd images/opentelemetry && make push
|
&& cd images/ && make NAME=opentelemetry push
|
||||||
|
|
1
images/test-runner/TAG
Normal file
1
images/test-runner/TAG
Normal file
|
@ -0,0 +1 @@
|
||||||
|
v0.0.1
|
Loading…
Reference in a new issue