vlagent: support logs collection #4375
Workflow file for this run
This file contains hidden or 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 | |
| # This workflow will run on master branch and on any pull requests targeting master | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - 'docs/**' | |
| - '*.md' | |
| - '.github/workflows/docs.yaml' | |
| - 'codespell/**' | |
| pull_request: | |
| branches: | |
| - master | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - ready_for_review | |
| - converted_to_draft | |
| paths-ignore: | |
| - 'docs/**' | |
| - '*.md' | |
| - '.github/workflows/docs.yaml' | |
| - 'codespell/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build and Test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| checks: write | |
| steps: | |
| - name: Free space | |
| run: | | |
| # cleanup up space to free additional ~20GiB of memory | |
| # which are lacking for multiplaform images build | |
| formatByteCount() { echo $(numfmt --to=iec-i --suffix=B --padding=7 $1'000'); } | |
| getAvailableSpace() { echo $(df -a $1 | awk 'NR > 1 {avail+=$4} END {print avail}'); } | |
| BEFORE=$(getAvailableSpace) | |
| sudo rm -rf /usr/local/lib/android || true | |
| sudo rm -rf /usr/share/dotnet || true | |
| sudo rm -rf /opt/ghc || true | |
| sudo rm -rf /usr/local/.ghcup || true | |
| AFTER=$(getAvailableSpace) | |
| SAVED=$((AFTER-BEFORE)) | |
| echo "Saved $(formatByteCount $SAVED)" | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Prepare binary cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ./bin | |
| key: binary | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: "go.mod" | |
| check-latest: true | |
| cache: true | |
| id: go | |
| - name: Run Trivy vulnerability scanner in repo mode | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| scan-type: "fs" | |
| ignore-unfixed: true | |
| format: "sarif" | |
| output: "trivy-results.sarif" | |
| - name: Upload Trivy scan results to GitHub Security tab | |
| uses: github/codeql-action/upload-sarif@v4 | |
| with: | |
| sarif_file: "trivy-results.sarif" | |
| - name: Set output variables | |
| id: vars | |
| run: | | |
| IMAGE_TAG=${GITHUB_SHA:0:7} | |
| echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_OUTPUT | |
| - name: Lint, Test and Build | |
| if: github.event.pull_request.draft == false | |
| env: | |
| GO111MODULE: on | |
| DOCKER_BUILD_ARGS: --cache-from=type=gha --cache-to=type=gha,mode=max | |
| TAG: ${{ steps.vars.outputs.IMAGE_TAG }} | |
| LICENSE_KEY: ${{ secrets.ENTERPRISE_COMPONENTS_LICENSE_KEY }} | |
| run: | | |
| make lint | |
| make manifests | |
| make api-gen | |
| # check for uncommited changes crds | |
| git diff --exit-code | |
| make test | |
| TAG=${TAG} make test-e2e | |
| - name: Publish Test Report | |
| uses: mikepenz/action-junit-report@v6 | |
| if: success() || failure() | |
| with: | |
| report_paths: 'report.xml' |