Bump oraclelinux from 8 to 10 in /packaging/tests/images/rpm #16763
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: "Integration Test" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: integration-test-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| GO_VERSION: 1.25.7 | |
| jobs: | |
| agent-bundle-linux: | |
| strategy: | |
| matrix: | |
| ARCH: [ "amd64", "arm64" ] | |
| fail-fast: false | |
| uses: ./.github/workflows/reusable-agent-bundle-linux.yml | |
| with: | |
| ARCH: ${{ matrix.ARCH }} | |
| otelcol: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| ARCH: [ "amd64", "arm64", "ppc64le" ] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache-dependency-path: '**/go.sum' | |
| - run: make binaries-linux_${{ matrix.ARCH }} COVER_TESTING=true | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: otelcol-${{ matrix.ARCH }} | |
| path: | | |
| ./bin/* | |
| docker-otelcol: | |
| name: docker-otelcol | |
| runs-on: ubuntu-24.04 | |
| needs: [ "agent-bundle-linux", "otelcol" ] | |
| services: | |
| # Start a local registry for pushing the multiarch manifest and images | |
| registry: | |
| image: registry:2 | |
| ports: | |
| - 5000:5000 | |
| steps: | |
| # Multiarch images require more disk space | |
| - uses: jlumbroso/free-disk-space@v1.3.1 | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache-dependency-path: '**/go.sum' | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| pattern: agent-bundle-linux-* | |
| merge-multiple: true | |
| path: ./dist | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| pattern: otelcol-* | |
| merge-multiple: true | |
| path: ./bin | |
| # Building multiarch container images requires qemu | |
| - uses: docker/setup-qemu-action@v3 | |
| with: | |
| platforms: arm64,ppc64le | |
| image: tonistiigi/binfmt:qemu-v7.0.0 | |
| - uses: docker/setup-buildx-action@v3 | |
| id: multiarch-otelcol-builder | |
| with: | |
| driver: docker-container # Create a builder with the docker-container driver required for multiarch builds | |
| driver-opts: network=host # Required for the builder to push to the local registry service | |
| - run: make docker-otelcol SKIP_COMPILE=true SKIP_BUNDLE=true ARCH=amd64,arm64,ppc64le IMAGE_NAME=localhost:5000/otelcol IMAGE_TAG=latest PUSH=true | |
| env: | |
| MULTIARCH_OTELCOL_BUILDER: ${{ steps.multiarch-otelcol-builder.outputs.name }} # Use the builder created by the docker/setup-buildx-action step | |
| - name: Save image archive for each platform to be loaded by downstream jobs | |
| run: | | |
| # The multi-arch build pushed a manifest list to localhost:5000. | |
| # We pull each platform by its specific digest (not the manifest list) | |
| # so docker save produces a single-platform tar for each arch. | |
| manifests=$(docker buildx imagetools inspect localhost:5000/otelcol:latest --raw) | |
| echo "=== Manifest list ===" | |
| echo "$manifests" | jq . | |
| for arch in "amd64" "arm64" "ppc64le"; do | |
| mkdir -p docker-otelcol/${arch} | |
| digest=$(echo "$manifests" | jq -r ".manifests[] | select(.platform.os==\"linux\" and .platform.architecture==\"${arch}\") | .digest") | |
| if [ -z "$digest" ]; then | |
| echo "ERROR: No manifest digest found for linux/${arch}" >&2 | |
| echo "$manifests" | jq '.manifests[].platform' >&2 | |
| exit 1 | |
| fi | |
| echo "=== ${arch}: digest=${digest} ===" | |
| docker pull "localhost:5000/otelcol@${digest}" | |
| docker tag "localhost:5000/otelcol@${digest}" otelcol:latest | |
| docker save -o "./docker-otelcol/${arch}/image.tar" otelcol:latest | |
| docker rmi -f "localhost:5000/otelcol@${digest}" otelcol:latest | |
| done | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: docker-otelcol-amd64 | |
| path: ./docker-otelcol/amd64 | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: docker-otelcol-arm64 | |
| path: ./docker-otelcol/arm64 | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: docker-otelcol-ppc64le | |
| path: ./docker-otelcol/ppc64le | |
| integration-vet: | |
| name: integration-vet | |
| runs-on: ${{ matrix.ARCH == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }} | |
| strategy: | |
| matrix: | |
| ARCH: [ "amd64", "arm64" ] | |
| fail-fast: false | |
| needs: [ "docker-otelcol", "otelcol" ] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache-dependency-path: '**/go.sum' | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: otelcol-${{ matrix.ARCH }} | |
| path: ./bin | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: docker-otelcol-${{ matrix.ARCH }} | |
| path: ./docker-otelcol/${{ matrix.ARCH }} | |
| - run: docker load -i ./docker-otelcol/${{ matrix.ARCH }}/image.tar | |
| - run: ln -sf otelcol_linux_${{ matrix.ARCH }} ./bin/otelcol | |
| - run: chmod a+x ./bin/* | |
| - run: make integration-vet | |
| env: | |
| SPLUNK_OTEL_COLLECTOR_IMAGE: 'otelcol:latest' | |
| integration-test-docker: | |
| runs-on: ubuntu-24.04 | |
| needs: [ "docker-otelcol", "otelcol" ] | |
| strategy: | |
| matrix: | |
| ARCH: [ "amd64", "arm64" ] | |
| PROFILE: [ "integration", "smartagent" ] | |
| fail-fast: false | |
| env: | |
| COVER_TESTING: true | |
| TEST_OUTPUT: ${{ github.job }}-${{ matrix.PROFILE }}-${{ matrix.ARCH }}.out | |
| steps: | |
| # Multiarch images require more disk space | |
| - uses: jlumbroso/free-disk-space@v1.3.1 | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build ${{ matrix.PROFILE }} service images | |
| run: | | |
| images=$(yq '.services[] | select(.profiles[] | . == "${{ matrix.PROFILE }}") | .image' docker/docker-compose.yml | grep "quay.io/splunko11ytest/" | sort -u) | |
| for image in $images; do | |
| service=$(basename "$image" | cut -d ':' -f1) | |
| if [[ -f docker/${service}/Dockerfile ]]; then | |
| docker build --cache-from="quay.io/splunko11ytest/${service}:latest" -t "quay.io/splunko11ytest/${service}:latest" "docker/${service}" | |
| fi | |
| done | |
| docker system prune -f | |
| docker builder prune -f | |
| docker images | |
| - run: docker compose -f docker/docker-compose.yml --profile ${{ matrix.PROFILE }} up -d --quiet-pull | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache-dependency-path: '**/go.sum' | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: otelcol-${{ matrix.ARCH }} | |
| path: ./bin | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: docker-otelcol-${{ matrix.ARCH }} | |
| path: ./docker-otelcol/${{ matrix.ARCH }} | |
| # Not all images used in the docker-compose have arm64 support, for those it is necessary to use qemu | |
| # Here is the list of "services" (see above) that don't support arm64: | |
| # On profile integration: oracle | |
| # On profile smartagent: httpd | |
| - uses: docker/setup-qemu-action@v3 | |
| if: ${{ matrix.ARCH != 'amd64' }} | |
| with: | |
| platforms: ${{ matrix.ARCH }} | |
| image: tonistiigi/binfmt:qemu-v7.0.0 | |
| - run: docker load -i ./docker-otelcol/${{ matrix.ARCH }}/image.tar | |
| - run: ln -sf otelcol_linux_${{ matrix.ARCH }} ./bin/otelcol | |
| - run: chmod a+x ./bin/* | |
| # Pre-build the telegraf-exec test image using buildx | |
| - name: Build telegraf-exec test image | |
| if: matrix.PROFILE == 'smartagent' | |
| run: | | |
| docker buildx build --load \ | |
| --platform linux/${{ matrix.ARCH }} \ | |
| --build-arg IMAGE_PLATFORM=linux/${{ matrix.ARCH }} \ | |
| --build-arg SPLUNK_OTEL_COLLECTOR_IMAGE=otelcol:latest \ | |
| -t telegraf-exec-test:latest \ | |
| tests/receivers/smartagent/telegraf-exec/testdata/exec | |
| - name: Run Integration Test With Cover | |
| run: | | |
| set -o pipefail | |
| target="integration-test-with-cover" | |
| if [[ "${{ matrix.PROFILE }}" = "smartagent" ]]; then | |
| target="smartagent-integration-test-with-cover" | |
| fi | |
| CONTAINER_COVER_SRC="$(realpath .)/tests/coverage" | |
| export CONTAINER_COVER_SRC | |
| make $target 2>&1 | tee "$TEST_OUTPUT" | |
| exit_status=${PIPESTATUS[0]} | |
| echo "Exit status: $exit_status" | |
| exit "$exit_status" | |
| env: | |
| CONTAINER_COVER_DEST: '/etc/otel/collector/coverage' | |
| SPLUNK_OTEL_COLLECTOR_IMAGE: 'otelcol:latest' | |
| TELEGRAF_EXEC_IMAGE: ${{ matrix.PROFILE == 'smartagent' && 'telegraf-exec-test:latest' || '' }} | |
| # The Integration Test output is extremely large so we upload it as an artifact | |
| - name: Upload Integration Test Output as Artifact | |
| uses: actions/upload-artifact@v6 | |
| if: always() | |
| with: | |
| name: ${{ env.TEST_OUTPUT }} | |
| path: ${{ env.TEST_OUTPUT }} | |
| retention-days: 5 | |
| - name: Upload coverage report | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # 5.5.2 | |
| with: | |
| verbose: true | |
| fail_ci_if_error: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| integration-test-binary: | |
| runs-on: ${{ matrix.RUNNER }} | |
| needs: [ "agent-bundle-linux", "otelcol" ] | |
| strategy: | |
| matrix: | |
| RUNNER: [ "ubuntu-22.04", "ubuntu-24.04" ] | |
| PROFILE: [ "integration", "smartagent" ] | |
| fail-fast: false | |
| env: | |
| COVER_TESTING: true | |
| TEST_OUTPUT: ${{ github.job }}-${{ matrix.PROFILE }}-${{ matrix.RUNNER }}.out | |
| steps: | |
| # Multiarch images require more disk space | |
| - uses: jlumbroso/free-disk-space@v1.3.1 | |
| if: matrix.PROFILE == 'integration' && matrix.RUNNER == 'ubuntu-24.04' | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build ${{ matrix.PROFILE }} service images | |
| run: | | |
| images=$(yq '.services[] | select(.profiles[] | . == "${{ matrix.PROFILE }}") | .image' docker/docker-compose.yml | grep "quay.io/splunko11ytest/" | sort -u) | |
| for image in $images; do | |
| service=$(basename "$image" | cut -d ':' -f1) | |
| if [[ -f docker/${service}/Dockerfile ]]; then | |
| docker build --cache-from="quay.io/splunko11ytest/${service}:latest" -t "quay.io/splunko11ytest/${service}:latest" "docker/${service}" | |
| fi | |
| done | |
| docker system prune -f | |
| docker builder prune -f | |
| docker images | |
| - run: docker compose -f docker/docker-compose.yml --profile ${{ matrix.PROFILE }} up -d --quiet-pull | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache-dependency-path: '**/go.sum' | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| pattern: agent-bundle-linux-amd64 | |
| merge-multiple: true | |
| path: ./dist | |
| - run: sudo mkdir -p /usr/lib/splunk-otel-collector | |
| - run: sudo tar -xzf dist/agent-bundle_linux_amd64.tar.gz -C /usr/lib/splunk-otel-collector | |
| - run: sudo chown -R "$USER" /usr/lib/splunk-otel-collector | |
| - run: /usr/lib/splunk-otel-collector/agent-bundle/bin/patch-interpreter /usr/lib/splunk-otel-collector/agent-bundle | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: otelcol-amd64 | |
| path: ./bin | |
| - run: ln -sf otelcol_linux_amd64 ./bin/otelcol | |
| - run: chmod a+x ./bin/* | |
| - name: Run Integration Test With Cover | |
| run: | | |
| set -o pipefail | |
| target="integration-test-with-cover" | |
| if [[ "${{ matrix.PROFILE }}" = "smartagent" ]]; then | |
| target="smartagent-integration-test-with-cover" | |
| fi | |
| CONTAINER_COVER_SRC="$(realpath .)/tests/coverage" | |
| export CONTAINER_COVER_SRC | |
| make $target 2>&1 | tee "$TEST_OUTPUT" | |
| exit_status=${PIPESTATUS[0]} | |
| echo "Exit status: $exit_status" | |
| exit "$exit_status" | |
| env: | |
| CONTAINER_COVER_DEST: '/etc/otel/collector/coverage' | |
| SPLUNK_OTEL_COLLECTOR_IMAGE: "" | |
| # The Integration Test output is extremely large so we upload it as an artifact | |
| - name: Upload Integration Test Output as Artifact | |
| uses: actions/upload-artifact@v6 | |
| if: always() | |
| with: | |
| name: ${{ env.TEST_OUTPUT }} | |
| path: ${{ env.TEST_OUTPUT }} | |
| retention-days: 5 | |
| - name: Upload coverage report | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # 5.5.2 | |
| with: | |
| verbose: true | |
| fail_ci_if_error: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| integration-test-discovery-matrix: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| matrix: ${{ steps.get-matrix.outputs.matrix }} | |
| steps: | |
| - name: Get matrix | |
| id: get-matrix | |
| run: | | |
| includes="" | |
| for service in "apache" "jmx/cassandra" "kafkametrics" "mongodb" "nginx" "envoy" "oracledb" "mysql" "redis" "weaviate"; do | |
| for arch in "amd64" "arm64"; do | |
| if [ "$service" = "mongodb" ]; then | |
| # tests for mongo "6.0" and "7.0" are flaky, skipping for now | |
| for mongodb_version in "4.0" "4.4" "5.0"; do | |
| includes="${includes},{\"SERVICE\": \"${service}\", \"ARCH\": \"${arch}\", \"MONGODB_VERSION\": \"${mongodb_version}\"}" | |
| done | |
| elif [[ ("$service" != "jmx/cassandra" && "$service" != "oracledb") || "arm64" != "$arch" ]]; then | |
| includes="${includes},{\"SERVICE\": \"${service}\", \"ARCH\": \"${arch}\"}" | |
| fi | |
| done | |
| done | |
| matrix="{\"include\": [${includes#,}]}" | |
| echo "$matrix" | jq | |
| echo "matrix=${matrix}" >> "$GITHUB_OUTPUT" | |
| integration-test-discovery: | |
| name: integration-test-discovery | |
| runs-on: ubuntu-24.04${{ matrix.ARCH == 'arm64' && '-arm' || '' }} | |
| needs: [ "docker-otelcol", "otelcol", "integration-test-discovery-matrix" ] | |
| strategy: | |
| matrix: ${{ fromJSON(needs.integration-test-discovery-matrix.outputs.matrix) }} | |
| fail-fast: false | |
| env: | |
| COVER_TESTING: true | |
| steps: | |
| - name: Free up disk space for next step | |
| uses: jlumbroso/free-disk-space@v1.3.1 | |
| if: runner.os == 'Linux' | |
| continue-on-error: true | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - run: echo "MONGODB_VERSION=${{ matrix.MONGODB_VERSION }}" > docker/.env | |
| if: matrix.SERVICE == 'mongodb' | |
| - run: docker compose -f docker/docker-compose.yml --profile integration-test-${{ matrix.SERVICE }}-discovery up -d --wait --build --quiet-pull | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache-dependency-path: '**/go.sum' | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: otelcol-${{ matrix.ARCH }} | |
| path: ./bin | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: docker-otelcol-${{ matrix.ARCH }} | |
| path: ./docker-otelcol/${{ matrix.ARCH }} | |
| - run: docker load -i ./docker-otelcol/${{ matrix.ARCH }}/image.tar | |
| - run: ln -sf otelcol_linux_${{ matrix.ARCH }} ./bin/otelcol | |
| - run: chmod a+x ./bin/* | |
| - name: Run ${{ matrix.SERVICE }} Discovery Integration Test With Cover | |
| run: | | |
| CONTAINER_COVER_SRC="$(realpath .)/tests/coverage" | |
| export CONTAINER_COVER_SRC | |
| make integration-test-${{ matrix.SERVICE }}-discovery-with-cover | |
| env: | |
| CONTAINER_COVER_DEST: '/etc/otel/collector/coverage' | |
| SPLUNK_OTEL_COLLECTOR_IMAGE: 'otelcol:latest' | |
| - name: Upload coverage report | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # 5.5.2 | |
| with: | |
| verbose: true | |
| fail_ci_if_error: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| integration-test-discovery-k8s-matrix: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| matrix: ${{ steps.get-matrix-k8s.outputs.matrix }} | |
| steps: | |
| - name: Get matrix for Kubernetes | |
| id: get-matrix-k8s | |
| run: | | |
| includes="" | |
| for service in "envoy" "istio"; do | |
| for arch in "amd64"; do | |
| includes="${includes},{\"SERVICE\": \"${service}\", \"ARCH\": \"${arch}\"}" | |
| done | |
| done | |
| matrix="{\"include\": [${includes#,}]}" | |
| echo "$matrix" | jq | |
| echo "matrix=${matrix}" >> "$GITHUB_OUTPUT" | |
| integration-test-discovery-k8s: | |
| name: integration-test-discovery-k8s | |
| runs-on: ubuntu-24.04 | |
| needs: [ "docker-otelcol", "otelcol", "integration-test-discovery-k8s-matrix" ] | |
| strategy: | |
| matrix: ${{ fromJSON(needs.integration-test-discovery-k8s-matrix.outputs.matrix) }} | |
| fail-fast: false | |
| steps: | |
| - name: Free up disk space for next step | |
| uses: jlumbroso/free-disk-space@v1.3.1 | |
| if: runner.os == 'Linux' | |
| continue-on-error: true | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Create kind cluster | |
| uses: helm/kind-action@v1.13.0 | |
| with: | |
| node_image: kindest/node:v1.30.0 | |
| kubectl_version: v1.30.0 | |
| cluster_name: kind | |
| config: ./.github/workflows/configs/kind-config.yaml | |
| - name: Deploy service under test | |
| if: ${{ matrix.SERVICE != 'istio' }} | |
| run: | | |
| for f in k8s/${{ matrix.SERVICE }}/*.sh; do | |
| bash "$f" | |
| done | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache-dependency-path: '**/go.sum' | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: docker-otelcol-${{ matrix.ARCH }} | |
| path: ./docker-otelcol/${{ matrix.ARCH }} | |
| - name: Fix kubelet TLS server certificates | |
| run: | | |
| kubectl get csr -o=jsonpath='{range.items[?(@.spec.signerName=="kubernetes.io/kubelet-serving")]}{.metadata.name}{" "}{end}' | xargs kubectl certificate approve | |
| - name: Load Docker image into kind | |
| run: | | |
| docker load -i ./docker-otelcol/${{ matrix.ARCH }}/image.tar | |
| kind load docker-image otelcol:latest --name kind | |
| - name: Run ${{ matrix.SERVICE }} Discovery Kubernetes Integration Test With Cover | |
| run: | | |
| CONTAINER_COVER_SRC="$(realpath .)/tests/coverage" | |
| export CONTAINER_COVER_SRC | |
| KUBECONFIG=$HOME/.kube/config SKIP_TEARDOWN=true make integration-test-${{ matrix.SERVICE }}-discovery-k8s-with-cover | |
| env: | |
| CONTAINER_COVER_DEST: '/etc/otel/collector/coverage' | |
| COVER_TESTING: true | |
| - name: Print logs | |
| if: failure() | |
| run: | | |
| kubectl get pods -A | |
| echo "=== otelcol logs (last 50 lines) ===" | |
| # shellcheck disable=SC2016 | |
| kubectl get pod -A -l app=otelcol -o jsonpath="{range .items[*]}{.metadata.namespace} {.metadata.name}{'\n'}{end}" | xargs -r -n2 sh -c 'kubectl logs -n "$0" "$1" --tail=50' | |
| echo "=== otelcol previous logs (last 50 lines) ===" | |
| # shellcheck disable=SC2016 | |
| kubectl get pod -A -l app=otelcol -o jsonpath="{range .items[*]}{.metadata.namespace} {.metadata.name}{'\n'}{end}" | xargs -r -n2 sh -c 'kubectl logs -n "$0" "$1" --previous --tail=50' || true | |
| echo "=== Pod describe ===" | |
| kubectl describe pod -n test -l app=otelcol || true | |
| echo "=== Events ===" | |
| kubectl get events -n test --sort-by='.lastTimestamp' || true | |
| - name: Upload coverage report | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # 5.5.2 | |
| with: | |
| verbose: true | |
| fail_ci_if_error: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |