Skip to content

[main] Upgrade to latest dependencies #2126

[main] Upgrade to latest dependencies

[main] Upgrade to latest dependencies #2126

Workflow file for this run

name: KinD e2e tests
on:
push:
branches: [ 'main', 'release-*' ]
pull_request:
branches: [ 'main', 'release-*' ]
jobs:
e2e-tests:
strategy:
matrix:
platform: [ ubuntu-latest ]
kind-version: [ 0.14.0 ]
name: e2e tests
runs-on: ${{ matrix.platform }}
env:
KO_DOCKER_REPO: kind.local
KIND_VERSION: ${{ matrix.kind-version }}
steps:
- name: Set up Go
uses: knative/actions/setup-go@main
id: go
- name: Check out code onto GOPATH
uses: actions/checkout@v2
with:
path: ./src/knative.dev/${{ github.event.repository.name }}
- name: Install KinD ${{ matrix.kind-version }}
working-directory: ./src/knative.dev/${{ github.event.repository.name }}
run: |
set -x
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v${KIND_VERSION}/kind-$(uname)-amd64
chmod +x ./kind
sudo mv kind /usr/local/bin
- name: Create KinD Cluster
working-directory: ./src/knative.dev/${{ github.event.repository.name }}
env:
NODE_IMAGE: 'kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6'
run: |
set -x
# KinD configuration.
cat > kind.yaml <<EOF
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
image: ${NODE_IMAGE}
- role: worker
image: ${NODE_IMAGE}
kubeadmConfigPatches:
- |
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
metadata:
name: config
apiServer:
extraArgs:
"service-account-issuer": "kubernetes.default.svc"
"service-account-signing-key-file": "/etc/kubernetes/pki/sa.key"
EOF
# Create a cluster!
kind create cluster --config kind.yaml
- name: Run e2e Tests
working-directory: ./src/knative.dev/${{ github.event.repository.name }}
run: |
set -x
source test/e2e-common.sh && test_setup
# Run the tests tagged as e2e on the KinD cluster.
go run gotest.tools/[email protected] --format testname -- \
-race -count=1 -timeout=1h -tags=e2e ./test/...
- name: Gather Failure Data
if: ${{ failure() }}
run: |
set -x
echo "===================== K8s Events ==========================="
kubectl get events --all-namespaces=true -oyaml
echo "===================== Pod Logs ============================="
namespace=knative-reconciler-test
for pod in $(kubectl get pod -n $namespace | grep Running | awk '{print $1}'); do
for container in $(kubectl get pod "${pod}" -n $namespace -ojsonpath='{.spec.containers[*].name}'); do
echo "Namespace, Pod, Container: ${namespace}, ${pod}, ${container}"
kubectl logs -n $namespace "${pod}" -c "${container}" || true
echo "----------------------------------------------------------"
echo "Namespace, Pod, Container (Previous instance): ${namespace}, ${pod}, ${container}"
kubectl logs -p -n $namespace "${pod}" -c "${container}" || true
echo "============================================================"
done
done