Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
Migrate k8s autodiscovery pipeline (#3596)
Browse files Browse the repository at this point in the history
* Migrate k8s-autodiscovery test to GH Actions workflow

* Remove Jenkins jobs

* Test stack snapshot branches

* Use sha for action version

* empty

(cherry picked from commit 37e80f6)

# Conflicts:
#	.ci/jobs/e2e-testing-k8s-autodiscovery-daily-mbp.yml
#	.github/workflows/opentelemetry.yml
  • Loading branch information
reakaleek authored and mergify[bot] committed Aug 2, 2023
1 parent fff4676 commit b34b261
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 55 deletions.
53 changes: 0 additions & 53 deletions .ci/e2eTestingK8SAutodiscoveryDaily.groovy

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/k8s-autodiscovery-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: k8s-autodiscovery-test

on:
workflow_dispatch:
schedule:
- cron: '0 18 * * *'

permissions:
contents: read

jobs:
elastic-stack-snapshot-branches:
runs-on: ubuntu-latest
timeout-minutes: 1
outputs:
matrix: ${{ steps.generator.outputs.matrix }}
steps:
- id: generator
uses: elastic/apm-pipeline-library/.github/actions/elastic-stack-snapshot-branches@current

k8s-autodiscovery-test:
needs: elastic-stack-snapshot-branches
strategy:
matrix: ${{ fromJson(needs.elastic-stack-snapshot-branches.outputs.matrix) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}
- id: get-go-version
name: Get Go version
run: echo "version=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v4
with:
go-version: ${{ steps.get-go-version.outputs.version }}
- name: Create k8s Kind Cluster
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
- name: Run k8s autodiscovery test
working-directory: e2e/_suites/kubernetes-autodiscover
env:
OP_LOG_LEVEL: DEBUG
run: go test -timeout 90m -v
23 changes: 23 additions & 0 deletions .github/workflows/opentelemetry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: OpenTelemetry Export Trace

on:
workflow_run:
workflows:
- bump-elastic-stack-snapshot
- golangci-lint
- k8s-autodiscovery-test
- pre-commit
- pull-request
- Test Report
types: [completed]

jobs:
otel-export-trace:
runs-on: ubuntu-latest
steps:
- uses: elastic/apm-pipeline-library/.github/actions/opentelemetry@current
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
4 changes: 2 additions & 2 deletions e2e/_suites/kubernetes-autodiscover/autodiscover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import (

var beatVersions = map[string]string{}

var defaultEventsWaitTimeout = 60 * time.Second
var defaultDeployWaitTimeout = 60 * time.Second
var defaultEventsWaitTimeout = 300 * time.Second
var defaultDeployWaitTimeout = 300 * time.Second

var tx *apm.Transaction
var stepSpan *apm.Span
Expand Down

0 comments on commit b34b261

Please sign in to comment.