Skip to content

[Output/Elasticsearch] Add template field #1944

[Output/Elasticsearch] Add template field

[Output/Elasticsearch] Add template field #1944

Workflow file for this run

name: E2E tests
on:
push:
branches:
- master
- "release-[0-9]+.[0-9]+*"
pull_request:
env:
GO_VERSION: '1.21'
KUBECTL_VERSION: 'v1.24.1'
jobs:
build:
name: Image build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and export
uses: docker/build-push-action@v4
with:
context: .
tags: controller:local
cache-from: type=gha
cache-to: type=gha,mode=max
outputs: type=docker,dest=/tmp/controller.tar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: controller
path: /tmp/controller.tar
go:
name: Go end2end tests
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
# matrix:
# SHARD: [0]
# SHARDS: [1]
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: controller
path: /tmp
- name: Load image
run: |
docker load --input /tmp/controller.tar
docker image ls -a
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Set up kubectl
uses: azure/setup-kubectl@v3
with:
version: ${{ env.KUBECTL_VERSION }}
- name: Checkout code
uses: actions/checkout@v3
- name: Run e2e tests
run: make test-e2e-ci
# env:
# SHARD: ${{ matrix.SHARD }}
# SHARDS: ${{ matrix.SHARDS }}
- name: Archive Test Results
if: always()
uses: actions/upload-artifact@v3
with:
name: go-e2e-test-cluster-logs
path: build/_test
retention-days: 5
chart:
name: Shell script tests with chart install
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
kube: ["1.22", "1.23", "1.24", "1.25", "1.26", "1.27"]
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: controller
path: /tmp
- name: Load image
run: |
docker load --input /tmp/controller.tar
docker image ls -a
- name: Set up kubectl
uses: azure/setup-kubectl@v3
with:
version: ${{ env.KUBECTL_VERSION }}
- name: Checkout code
uses: actions/checkout@v3
# See https://github.com/kubernetes-sigs/kind/releases/tag/v0.20.0
- name: Determine KinD node image version
id: node_image
run: |
case ${{ matrix.kube }} in
1.22)
NODE_IMAGE=kindest/node:v1.22.17@sha256:f5b2e5698c6c9d6d0adc419c0deae21a425c07d81bbf3b6a6834042f25d4fba2 ;;
1.23)
NODE_IMAGE=kindest/node:v1.23.17@sha256:59c989ff8a517a93127d4a536e7014d28e235fb3529d9fba91b3951d461edfdb ;;
1.24)
NODE_IMAGE=kindest/node:v1.24.15@sha256:7db4f8bea3e14b82d12e044e25e34bd53754b7f2b0e9d56df21774e6f66a70ab ;;
1.25)
NODE_IMAGE=kindest/node:v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8 ;;
1.26)
NODE_IMAGE=kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb ;;
1.27)
NODE_IMAGE=kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72 ;;
esac
echo "image=$NODE_IMAGE" >> $GITHUB_OUTPUT
- name: Make setup
run: make kind-cluster stern
env:
KIND_IMAGE: ${{ steps.node_image.outputs.image }}
- name: Test
run: hack/test.sh
- name: Print last 10k kubernetes logs from default and logging namespaces
if: always()
run: |
mkdir -p build/_test
bin/stern -n default,logging ".*" --tail 100000 --no-follow > build/_test/cluster.logs
- name: Archive Test Results
if: always()
uses: actions/upload-artifact@v3
with:
name: script-e2e-test-cluster-logs
path: build/_test
retention-days: 5