Update Contour Docker image to v1.28.7. #10920
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: Build and Test Pull Request | |
# Trigger the workflow on push or pull request | |
on: | |
push: | |
branches-ignore: | |
- "dependabot/**" | |
pull_request: | |
types: [opened, synchronize] | |
permissions: | |
contents: read | |
env: | |
GOPROXY: https://proxy.golang.org/ | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
GO_VERSION: 1.21.13 | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
cache: false | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
persist-credentials: false | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@d6238b002a20823d52840fda27e2d4891c5952dc # v4.0.1 | |
with: | |
version: v1.55.2 | |
# TODO: re-enable linting tools package once https://github.com/projectcontour/contour/issues/5077 | |
# is resolved | |
args: --build-tags=e2e,conformance,gcp,oidc,none --out-format=colored-line-number | |
- uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f # v2.0.0 | |
with: | |
status: ${{ job.status }} | |
steps: ${{ toJson(steps) }} | |
channel: '#contour-ci-notifications' | |
if: ${{ failure() && github.ref == 'refs/heads/main' }} | |
codespell: | |
name: Codespell | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
persist-credentials: false | |
- name: Codespell | |
uses: codespell-project/actions-codespell@94259cd8be02ad2903ba34a22d9c13de21a74461 # v2.0 | |
with: | |
skip: .git,*.png,*.woff,*.woff2,*.eot,*.ttf,*.jpg,*.ico,*.svg,./site/themes/contour/static/fonts/README.md,./vendor,./site/public,./hack/actions/check-changefile-exists.go,go.mod,go.sum | |
ignore_words_file: './.codespell.ignorewords' | |
check_filenames: true | |
check_hidden: true | |
- uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f # v2.0.0 | |
with: | |
status: ${{ job.status }} | |
steps: ${{ toJson(steps) }} | |
channel: '#contour-ci-notifications' | |
if: ${{ failure() && github.ref == 'refs/heads/main' }} | |
codegen: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
persist-credentials: false | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
# * Module download cache | |
# * Build cache (Linux) | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
key: ${{ runner.os }}-${{ github.job }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-${{ github.job }}-go- | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
cache: false | |
- name: add deps to path | |
run: | | |
./hack/actions/install-kubernetes-toolchain.sh $GITHUB_WORKSPACE/bin | |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH | |
- name: generate | |
run: | | |
make generate lint-yamllint lint-flags | |
./hack/actions/check-uncommitted-codegen.sh | |
- uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f # v2.0.0 | |
with: | |
status: ${{ job.status }} | |
steps: ${{ toJson(steps) }} | |
channel: '#contour-ci-notifications' | |
if: ${{ failure() && github.ref == 'refs/heads/main' }} | |
build-image: | |
needs: | |
- lint | |
- codespell | |
- codegen | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
persist-credentials: false | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 | |
with: | |
version: latest | |
- name: Build image | |
env: | |
TAG_LATEST: "false" | |
run: | | |
make multiarch-build | |
- name: Upload image | |
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 | |
with: | |
name: image | |
path: image/contour-*.tar | |
- uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f # v2.0.0 | |
with: | |
status: ${{ job.status }} | |
steps: ${{ toJson(steps) }} | |
channel: '#contour-ci-notifications' | |
if: ${{ failure() && github.ref == 'refs/heads/main' }} | |
e2e: | |
runs-on: ubuntu-latest | |
needs: [build-image] | |
strategy: | |
matrix: | |
# use stable kubernetes_version values since they're included | |
# in the name of the GitHub Actions job, and we don't want to | |
# have to update branch protection rules every time we change | |
# a Kubernetes version number. | |
kubernetes_version: ["kubernetes:latest", "kubernetes:n-1", "kubernetes:n-2"] | |
# run tests using the configuration crd as well as without | |
config_type: ["ConfigmapConfiguration", "ContourConfiguration"] | |
# include defines an additional variable (the specific node | |
# image to use) for each kubernetes_version value. | |
include: | |
- kubernetes_version: "kubernetes:latest" | |
node_image: "docker.io/kindest/node:v1.29.1@sha256:a0cc28af37cf39b019e2b448c54d1a3f789de32536cb5a5db61a49623e527144" | |
- kubernetes_version: "kubernetes:n-1" | |
node_image: "docker.io/kindest/node:v1.28.6@sha256:b7e1cf6b2b729f604133c667a6be8aab6f4dde5bb042c1891ae248d9154f665b" | |
- kubernetes_version: "kubernetes:n-2" | |
node_image: "docker.io/kindest/node:v1.27.10@sha256:3700c811144e24a6c6181065265f69b9bf0b437c45741017182d7c82b908918f" | |
- config_type: "ConfigmapConfiguration" | |
use_config_crd: "false" | |
- config_type: "ContourConfiguration" | |
use_config_crd: "true" | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
persist-credentials: false | |
- name: Download image | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: image | |
path: image | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
# * Module download cache | |
# * Build cache (Linux) | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
key: ${{ runner.os }}-${{ github.job }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-${{ github.job }}-go- | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
cache: false | |
- name: add deps to path | |
run: | | |
./hack/actions/install-kubernetes-toolchain.sh $GITHUB_WORKSPACE/bin | |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH | |
- name: e2e tests | |
env: | |
NODEIMAGE: ${{ matrix.node_image }} | |
LOAD_PREBUILT_IMAGE: "true" | |
USE_CONTOUR_CONFIGURATION_CRD: ${{ matrix.use_config_crd }} | |
run: | | |
export CONTOUR_E2E_IMAGE="ghcr.io/projectcontour/contour:$(ls ./image/contour-*.tar | sed -E 's/.*contour-(.*).tar/\1/')" | |
make e2e | |
- uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f # v2.0.0 | |
with: | |
status: ${{ job.status }} | |
steps: ${{ toJson(steps) }} | |
channel: '#contour-ci-notifications' | |
if: ${{ failure() && github.ref == 'refs/heads/main' }} | |
upgrade: | |
runs-on: ubuntu-latest | |
needs: [build-image] | |
strategy: | |
matrix: | |
# use stable kubernetes_version values since they're included | |
# in the name of the GitHub Actions job, and we don't want to | |
# have to update branch protection rules every time we change | |
# a Kubernetes version number. | |
kubernetes_version: ["kubernetes:latest", "kubernetes:n-1", "kubernetes:n-2"] | |
# include defines an additional variable (the specific node | |
# image to use) for each kubernetes_version value. | |
include: | |
- kubernetes_version: "kubernetes:latest" | |
node_image: "docker.io/kindest/node:v1.29.1@sha256:a0cc28af37cf39b019e2b448c54d1a3f789de32536cb5a5db61a49623e527144" | |
- kubernetes_version: "kubernetes:n-1" | |
node_image: "docker.io/kindest/node:v1.28.6@sha256:b7e1cf6b2b729f604133c667a6be8aab6f4dde5bb042c1891ae248d9154f665b" | |
- kubernetes_version: "kubernetes:n-2" | |
node_image: "docker.io/kindest/node:v1.27.10@sha256:3700c811144e24a6c6181065265f69b9bf0b437c45741017182d7c82b908918f" | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
persist-credentials: false | |
# Fetch history for all tags and branches so we can figure out most | |
# recent release tag. | |
fetch-depth: 0 | |
- name: Download image | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: image | |
path: image | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
# * Module download cache | |
# * Build cache (Linux) | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
key: ${{ runner.os }}-${{ github.job }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-${{ github.job }}-go- | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
cache: false | |
- name: add deps to path | |
run: | | |
./hack/actions/install-kubernetes-toolchain.sh $GITHUB_WORKSPACE/bin | |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH | |
- name: upgrade tests | |
env: | |
NODEIMAGE: ${{ matrix.node_image }} | |
MULTINODE_CLUSTER: "true" | |
LOAD_PREBUILT_IMAGE: "true" | |
SKIP_GATEWAY_API_INSTALL: "true" | |
run: | | |
export CONTOUR_E2E_IMAGE="ghcr.io/projectcontour/contour:$(ls ./image/contour-*.tar | sed -E 's/.*contour-(.*).tar/\1/')" | |
make upgrade | |
- uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f # v2.0.0 | |
with: | |
status: ${{ job.status }} | |
steps: ${{ toJson(steps) }} | |
channel: '#contour-ci-notifications' | |
if: ${{ failure() && github.ref == 'refs/heads/main' }} | |
test-linux: | |
needs: | |
- lint | |
- codespell | |
- codegen | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
persist-credentials: false | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
# * Module download cache | |
# * Build cache (Linux) | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
key: ${{ runner.os }}-${{ github.job }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-${{ github.job }}-go- | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
cache: false | |
- name: add deps to path | |
run: | | |
./hack/actions/install-kubernetes-toolchain.sh $GITHUB_WORKSPACE/bin | |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH | |
- name: test | |
run: | | |
make install | |
make check-coverage | |
- name: codeCoverage | |
if: ${{ success() }} | |
uses: codecov/codecov-action@0cfda1dd0a4ad9efc75517f399d859cd1ea4ced1 # v4.0.2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage.out | |
- uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f # v2.0.0 | |
with: | |
status: ${{ job.status }} | |
steps: ${{ toJson(steps) }} | |
channel: '#contour-ci-notifications' | |
if: ${{ failure() && github.ref == 'refs/heads/main' }} | |
test-osx: | |
needs: | |
- lint | |
- codespell | |
- codegen | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
persist-credentials: false | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
# * Module download cache | |
# * Build cache (Windows) | |
path: | | |
~/go/pkg/mod | |
~/Library/Caches/go-build | |
key: ${{ runner.os }}-${{ github.job }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-${{ github.job }}-go- | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
cache: false | |
- name: add deps to path | |
run: | | |
./hack/actions/install-kubernetes-toolchain.sh $GITHUB_WORKSPACE/bin | |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH | |
- name: test | |
run: | | |
make install | |
make check-coverage | |
- uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f # v2.0.0 | |
with: | |
status: ${{ job.status }} | |
steps: ${{ toJson(steps) }} | |
channel: '#contour-ci-notifications' | |
if: ${{ failure() && github.ref == 'refs/heads/main' }} | |
gateway-conformance: | |
runs-on: ubuntu-latest | |
needs: [build-image] | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
persist-credentials: false | |
- name: Download image | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: image | |
path: image | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
# * Module download cache | |
# * Build cache (Linux) | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
key: ${{ runner.os }}-${{ github.job }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-${{ github.job }}-go- | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
cache: false | |
- name: add deps to path | |
run: | | |
./hack/actions/install-kubernetes-toolchain.sh $GITHUB_WORKSPACE/bin | |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH | |
- name: Gateway API conformance tests | |
env: | |
LOAD_PREBUILT_IMAGE: "true" | |
run: | | |
export CONTOUR_E2E_IMAGE="ghcr.io/projectcontour/contour:$(ls ./image/contour-*.tar | sed -E 's/.*contour-(.*).tar/\1/')" | |
make gateway-conformance | |
- uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f # v2.0.0 | |
with: | |
status: ${{ job.status }} | |
steps: ${{ toJson(steps) }} | |
channel: '#contour-ci-notifications' | |
if: ${{ failure() && github.ref == 'refs/heads/main' }} |