diff --git a/.github/workflows/ci-crossdock.yml b/.github/workflows/ci-crossdock.yml new file mode 100644 index 00000000000..a10c4733b86 --- /dev/null +++ b/.github/workflows/ci-crossdock.yml @@ -0,0 +1,53 @@ +name: CIT Crossdock + +on: + push: + branches: [main] + + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + +# See /~https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions +permissions: + contents: read + +jobs: + crossdock: + runs-on: ubuntu-latest + + steps: + - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + with: + submodules: true + + - name: Fetch git tags + run: | + git fetch --prune --unshallow --tags + + - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + with: + go-version: 1.23.x + + - uses: ./.github/actions/setup-branch + + - run: make install-ci + + - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 + + - name: Build, test, and publish crossdock image + run: bash scripts/build-crossdock.sh + env: + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} + + - name: Output crossdock logs + run: make crossdock-logs + if: ${{ failure() }} diff --git a/.github/workflows/ci-docker-hotrod.yml b/.github/workflows/ci-docker-hotrod.yml new file mode 100644 index 00000000000..39142486796 --- /dev/null +++ b/.github/workflows/ci-docker-hotrod.yml @@ -0,0 +1,78 @@ +name: CIT Hotrod + +on: + push: + branches: [main] + + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + +# See /~https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions +permissions: + contents: read + +jobs: + hotrod: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + runtime: [docker, k8s] + jaeger-version: [v1, v2] + + steps: + - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + with: + submodules: true + + - name: Fetch git tags + run: | + git fetch --prune --unshallow --tags + + - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + with: + go-version: 1.23.x + + - uses: ./.github/actions/setup-node.js + + - uses: ./.github/actions/setup-branch + + - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 + + - name: Define BUILD_FLAGS var if running on a Pull Request + run: | + case ${GITHUB_EVENT_NAME} in + pull_request) + echo "BUILD_FLAGS=-l -p linux/amd64" >> ${GITHUB_ENV} + ;; + *) + echo "BUILD_FLAGS=" >> ${GITHUB_ENV} + ;; + esac + - name: Install kubectl + if: matrix.runtime == 'k8s' + uses: azure/setup-kubectl@v4 + with: + version: 'latest' + + - name: Install Kustomize + if: matrix.runtime == 'k8s' + uses: imranismail/setup-kustomize@v2 + + - name: Create k8s Kind Cluster + if: matrix.runtime == 'k8s' + uses: helm/kind-action@v1 + + - name: Build, test, and publish hotrod image + run: bash scripts/build-hotrod-image.sh ${{ env.BUILD_FLAGS }} -v ${{ matrix.jaeger-version }} -r ${{ matrix.runtime }} + env: + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} diff --git a/.github/workflows/ci-e2e-badger.yaml b/.github/workflows/ci-e2e-badger.yaml new file mode 100644 index 00000000000..e4ec18ad83a --- /dev/null +++ b/.github/workflows/ci-e2e-badger.yaml @@ -0,0 +1,52 @@ +name: CIT Badger + +on: + push: + branches: [main] + + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + +# See /~https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions +permissions: # added using /~https://github.com/step-security/secure-workflows + contents: read + +jobs: + badger: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: [v1, v2] + steps: + - name: Harden Runner + uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + + - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + with: + go-version: 1.23.x + + - name: Run Badger storage integration tests + run: | + case ${{ matrix.version }} in + v1) + make badger-storage-integration-test + ;; + v2) + STORAGE=badger make jaeger-v2-storage-integration-test + ;; + esac + + - name: Upload coverage to codecov + uses: ./.github/actions/upload-codecov + with: + files: cover.out + flags: badger_${{ matrix.version }} diff --git a/.github/workflows/ci-e2e-cassandra.yml b/.github/workflows/ci-e2e-cassandra.yml new file mode 100644 index 00000000000..3ca6709e012 --- /dev/null +++ b/.github/workflows/ci-e2e-cassandra.yml @@ -0,0 +1,60 @@ +name: CIT Cassandra + +on: + push: + branches: [main] + + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + +# See /~https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions +permissions: # added using /~https://github.com/step-security/secure-workflows + contents: read + +jobs: + cassandra: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + jaeger-version: [v1, v2] + create-schema: [manual, auto] + version: + - distribution: cassandra + major: 4.x + schema: v004 + - distribution: cassandra + major: 5.x + schema: v004 + exclude: + # Exclude v1 as create schema on fly is available for v2 only + - jaeger-version: v1 + create-schema: auto + name: ${{ matrix.version.distribution }}-${{ matrix.version.major }} ${{ matrix.jaeger-version }} schema=${{ matrix.create-schema }} + steps: + - name: Harden Runner + uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + + - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + with: + go-version: 1.23.x + + - name: Run cassandra integration tests + id: test-execution + run: bash scripts/cassandra-integration-test.sh ${{ matrix.version.major }} ${{ matrix.version.schema }} ${{ matrix.jaeger-version }} + env: + SKIP_APPLY_SCHEMA: ${{ matrix.create-schema == 'auto' && true || false }} + + - name: Upload coverage to codecov + uses: ./.github/actions/upload-codecov + with: + files: cover.out + flags: cassandra-${{ matrix.version.major }}-${{ matrix.jaeger-version }}-${{ matrix.create-schema }} diff --git a/.github/workflows/ci-e2e-elasticsearch.yml b/.github/workflows/ci-e2e-elasticsearch.yml new file mode 100644 index 00000000000..e10491e736e --- /dev/null +++ b/.github/workflows/ci-e2e-elasticsearch.yml @@ -0,0 +1,71 @@ +name: CIT Elasticsearch + +on: + push: + branches: [main] + + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + +# See /~https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions +permissions: # added using /~https://github.com/step-security/secure-workflows + contents: read + +jobs: + elasticsearch: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: + - major: 6.x + distribution: elasticsearch + jaeger: v1 + - major: 7.x + distribution: elasticsearch + jaeger: v1 + - major: 8.x + distribution: elasticsearch + jaeger: v1 + - major: 8.x + distribution: elasticsearch + jaeger: v2 + name: ${{ matrix.version.distribution }} ${{ matrix.version.major }} ${{ matrix.version.jaeger }} + steps: + - name: Harden Runner + uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + with: + submodules: true + + - name: Fetch git tags + run: | + git fetch --prune --unshallow --tags + + - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + with: + go-version: 1.23.x + + - name: time settings + run: | + date + echo TZ="$TZ" + + - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 + - name: Run ${{ matrix.version.distribution }} integration tests + id: test-execution + run: bash scripts/es-integration-test.sh ${{ matrix.version.distribution }} ${{ matrix.version.major }} ${{ matrix.version.jaeger }} + + - name: Upload coverage to codecov + uses: ./.github/actions/upload-codecov + with: + files: cover.out,cover-index-cleaner.out,cover-index-rollover.out + flags: ${{ matrix.version.distribution }}-${{ matrix.version.major }}-${{ matrix.version.jaeger }} + diff --git a/.github/workflows/ci-e2e-grpc.yml b/.github/workflows/ci-e2e-grpc.yml new file mode 100644 index 00000000000..bc2af82f7f1 --- /dev/null +++ b/.github/workflows/ci-e2e-grpc.yml @@ -0,0 +1,52 @@ +name: CIT gRPC + +on: + push: + branches: [main] + + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + +# See /~https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions +permissions: # added using /~https://github.com/step-security/secure-workflows + contents: read + +jobs: + grpc: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: [v1, v2] + steps: + - name: Harden Runner + uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + + - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + with: + go-version: 1.23.x + + - name: Run gRPC storage integration tests + run: | + case ${{ matrix.version }} in + v1) + SPAN_STORAGE_TYPE=memory make grpc-storage-integration-test + ;; + v2) + STORAGE=grpc SPAN_STORAGE_TYPE=memory make jaeger-v2-storage-integration-test + ;; + esac + + - name: Upload coverage to codecov + uses: ./.github/actions/upload-codecov + with: + files: cover.out + flags: grpc_${{ matrix.version }} diff --git a/.github/workflows/ci-e2e-kafka.yml b/.github/workflows/ci-e2e-kafka.yml new file mode 100644 index 00000000000..162a077470e --- /dev/null +++ b/.github/workflows/ci-e2e-kafka.yml @@ -0,0 +1,46 @@ +name: CIT Kafka + +on: + push: + branches: [main] + + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + +# See /~https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions +permissions: # added using /~https://github.com/step-security/secure-workflows + contents: read + +jobs: + kafka: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + jaeger-version: [v1, v2] # Adjust if there are specific versions of Jaeger + name: Kafka Integration Tests ${{ matrix.jaeger-version }} + steps: + - name: Harden Runner + uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + + - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + with: + go-version: 1.23.x + + - name: Run Kafka integration tests + id: test-execution + run: bash scripts/kafka-integration-test.sh -j ${{ matrix.jaeger-version }} + + - name: Upload coverage to codecov + uses: ./.github/actions/upload-codecov + with: + files: cover.out + flags: kafka-${{ matrix.jaeger-version }} diff --git a/.github/workflows/ci-e2e-memory.yaml b/.github/workflows/ci-e2e-memory.yaml new file mode 100644 index 00000000000..cdb17650e08 --- /dev/null +++ b/.github/workflows/ci-e2e-memory.yaml @@ -0,0 +1,41 @@ +name: CIT Memory + +on: + push: + branches: [main] + + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + +# See /~https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions +permissions: # added using /~https://github.com/step-security/secure-workflows + contents: read + +jobs: + memory-v2: + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + + - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + with: + go-version: 1.23.x + + - name: Run Memory storage integration tests + run: | + STORAGE=memory_v2 make jaeger-v2-storage-integration-test + + - name: Upload coverage to codecov + uses: ./.github/actions/upload-codecov + with: + files: cover.out + flags: memory_v2 diff --git a/.github/workflows/ci-e2e-opensearch.yml b/.github/workflows/ci-e2e-opensearch.yml new file mode 100644 index 00000000000..63fd77947f2 --- /dev/null +++ b/.github/workflows/ci-e2e-opensearch.yml @@ -0,0 +1,63 @@ +name: CIT OpenSearch + +on: + push: + branches: [main] + + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} + cancel-in-progress: true + +# See /~https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions +permissions: # added using /~https://github.com/step-security/secure-workflows + contents: read + +jobs: + opensearch: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: + - major: 1.x + distribution: opensearch + jaeger: v1 + - major: 2.x + distribution: opensearch + jaeger: v1 + - major: 2.x + distribution: opensearch + jaeger: v2 + name: ${{ matrix.version.distribution }} ${{ matrix.version.major }} ${{ matrix.version.jaeger }} + steps: + - name: Harden Runner + uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + with: + submodules: true + + - name: Fetch git tags + run: | + git fetch --prune --unshallow --tags + + - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + with: + go-version: 1.23.x + + - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 + + - name: Run ${{ matrix.version.distribution }} integration tests + id: test-execution + run: bash scripts/es-integration-test.sh ${{ matrix.version.distribution }} ${{ matrix.version.major }} ${{ matrix.version.jaeger }} + + - name: Upload coverage to codecov + uses: ./.github/actions/upload-codecov + with: + files: cover.out,cover-index-cleaner.out,cover-index-rollover.out + flags: ${{ matrix.version.distribution }}-${{ matrix.version.major }}-${{ matrix.version.jaeger }}