Skip to content

docs: add instruction to remove unwanted attributes from systemd logs #4989

docs: add instruction to remove unwanted attributes from systemd logs

docs: add instruction to remove unwanted attributes from systemd logs #4989

Workflow file for this run

name: PRs checks
on:
pull_request:
branches:
- main
- "release-v[0-9]+"
- "release-v[0-9]+.[0-9]+"
jobs:
docs-changed:
runs-on: ubuntu-22.04
outputs:
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check if documentation related files changed
id: changed-files
uses: tj-actions/changed-files@v35
with:
files: |
**/*.md
images/*
ci/*
.github/*
**/Makefile
.*
chart-changed:
runs-on: ubuntu-22.04
outputs:
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check if Helm Chart related files changed
id: changed-files
uses: tj-actions/changed-files@v35
with:
files: |
deploy/helm/sumologic/**/*
**/*.yaml
**/*.yml
**/go.mod
**/go.sum
**/*.go
ci/*
.github/*
**/Makefile
.*
tests/integration/kind_images.json
markdownlint:
runs-on: ubuntu-22.04
needs: [docs-changed]
env:
PRETTIER_VERSION: 2.8.4
steps:
- uses: actions/checkout@v3
- name: install markdownlint and prettier
if: needs.docs-changed.outputs.any_changed == 'true'
run: npm install -g markdownlint-cli prettier@${PRETTIER_VERSION}
- name: markdown-lint check
if: needs.docs-changed.outputs.any_changed == 'true'
run: make markdown-lint
shellcheck:
runs-on: ubuntu-22.04
env:
YQ_VERSION: 4.33.2
SHELLCHECK_VERSION: 0.9.0
steps:
- uses: actions/checkout@v3
- name: install shellcheck
run: |
curl --retry 10 --retry-max-time 120 --retry-delay 5 -Lo- https://github.com/koalaman/shellcheck/releases/download/v${{ env.SHELLCHECK_VERSION }}/shellcheck-v${{ env.SHELLCHECK_VERSION }}.linux.x86_64.tar.xz | tar -xJf -
sudo cp shellcheck-v${{ env.SHELLCHECK_VERSION }}/shellcheck /usr/local/bin && rm -rf shellcheck-v${{ env.SHELLCHECK_VERSION }}
- name: install yq
run: |
curl --retry 10 --retry-max-time 120 --retry-delay 5 -L -o /tmp/yq https://github.com/mikefarah/yq/releases/download/v${{ env.YQ_VERSION }}/yq_linux_amd64
chmod +x /tmp/yq
sudo mv /tmp/yq /usr/local/bin/yq
- name: shellcheck
run: make shellcheck
yamllint:
runs-on: ubuntu-22.04
needs: [chart-changed]
env:
PRETTIER_VERSION: 2.8.4
steps:
- uses: actions/checkout@v3
- name: install yamllint
if: needs.chart-changed.outputs.any_changed == 'true'
run: npm install -g prettier@${PRETTIER_VERSION}
- name: yamllint
if: needs.chart-changed.outputs.any_changed == 'true'
run: make yaml-lint
helmlint:
runs-on: ubuntu-22.04
needs: [chart-changed]
steps:
- uses: actions/checkout@v3
- name: Lint helm chart
if: needs.chart-changed.outputs.any_changed == 'true'
run: |
make helm-dependency-update
make helm-lint
markdown-link-check:
runs-on: ubuntu-22.04
needs: [docs-changed]
steps:
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: ".markdown_link_check.json"
use-quiet-mode: yes
check-modified-files-only: yes
base-branch: ${{ github.base_ref }}
md-links-lint:
runs-on: ubuntu-22.04
needs: [docs-changed]
steps:
- uses: actions/checkout@v3
- name: Lint markdown links
if: needs.docs-changed.outputs.any_changed == 'true'
run: |
make markdown-links-lint
check-configuration-keys:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install pyyaml
- run: |
make check-configuration-keys
lint-template-tests:
name: Lint template tests
runs-on: ubuntu-latest
needs: [chart-changed]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
if: needs.chart-changed.outputs.any_changed == 'true'
with:
go-version: "1.20"
cache: false
- name: golangci-lint
if: needs.chart-changed.outputs.any_changed == 'true'
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
working-directory: ./tests/helm/
# Optional: golangci-lint command line arguments.
args: --timeout=10m --verbose
test:
runs-on: ubuntu-22.04
needs:
- helmlint
- chart-changed
steps:
- uses: actions/checkout@v3
- name: Setup go
if: needs.chart-changed.outputs.any_changed == 'true'
uses: actions/setup-go@v4
with:
go-version: "1.20"
cache-dependency-path: "**/go.sum"
- name: test
if: needs.chart-changed.outputs.any_changed == 'true'
run: make test-templates
##############################################################################
# Integration tests
##############################################################################
setup-integration-tests:
runs-on: ubuntu-22.04
needs: [chart-changed]
if: needs.chart-changed.outputs.any_changed == 'true'
outputs:
kind_images: ${{ steps.set_kind_images.outputs.kind_images }}
test_names: ${{ steps.set_test_names.outputs.test_names }}
steps:
- uses: actions/checkout@v3
- id: set_kind_images
name: Set kind images
working-directory: ./tests/integration/
run: |
echo "kind_images=$(jq -cM '.supported' kind_images.json)" >> $GITHUB_OUTPUT
- name: Print kind images
run: echo "Kind images ${{ steps.set_kind_images.outputs.kind_images }}"
- id: set_test_names
name: Set test names
working-directory: ./tests/integration/
# grep magic described in https://unix.stackexchange.com/a/13472
run: |
echo "test_names=$(grep -shoP "(?<=^func )(Test[a-zA-z_0-9]+)(?=\(t \*testing.T\) {)" * | jq -R . | jq -cs .)" >> $GITHUB_OUTPUT
- name: Print test names
run: echo "Test names ${{ steps.set_test_names.outputs.test_names }}"
lint-integration-tests:
name: Lint integration tests
runs-on: ubuntu-latest
needs: [chart-changed]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
if: needs.chart-changed.outputs.any_changed == 'true'
with:
go-version: "1.20"
cache: false
- name: golangci-lint
if: needs.chart-changed.outputs.any_changed == 'true'
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
working-directory: ./tests/integration/
# Optional: golangci-lint command line arguments.
args: --timeout=10m --verbose
integration-tests:
runs-on: ubuntu-22.04
name: IT - ${{ matrix.test_name }} - ${{ matrix.kind_image }}
needs:
- setup-integration-tests
- chart-changed
if: needs.chart-changed.outputs.any_changed == 'true'
strategy:
matrix:
kind_image: ${{ fromJSON(needs.setup-integration-tests.outputs.kind_images) }}
test_name: ${{ fromJSON(needs.setup-integration-tests.outputs.test_names) }}
env:
KIND_VERSION: 0.17.0
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: "1.20"
cache-dependency-path: "**/go.sum"
- name: Setup kind
run: |
curl --retry 10 --retry-max-time 120 --retry-delay 5 -Lo ./kind https://kind.sigs.k8s.io/dl/v${{env.KIND_VERSION}}/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
- name: Run integration test - ${{ matrix.test_name }}
working-directory: ./tests/integration/
run: make test TEST_NAME=^${{matrix.test_name}}$ KIND_NODE_IMAGE=${{matrix.kind_image}}
integration-test-status:
runs-on: ubuntu-22.04
if: ${{ always() }}
needs:
- integration-tests
- chart-changed
steps:
- name: Skipped
if: needs.chart-changed.outputs.any_changed == 'false'
run: exit 0
- name: Tests passed
if: ${{ (needs.chart-changed.outputs.any_changed == 'true') && !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Tests failed
if: ${{ (needs.chart-changed.outputs.any_changed == 'true') && contains(needs.*.result, 'failure') }}
run: exit 1