From af434255e080e45bc39f7cab5d59bcb1ca94419a Mon Sep 17 00:00:00 2001 From: Irfan Shah Date: Wed, 4 Mar 2026 14:57:18 +0530 Subject: [PATCH] chore(gha): add base14 Scout CI/CD observability workflow Export GitHub Actions workflow traces to Scout via OpenTelemetry using a workflow_run trigger, requiring no changes to existing workflows. Added a scope for commit category and updated the contributing doc. --- .github/workflows/otel-export.yml | 25 +++++++++++++++++++++++++ .github/workflows/pr-lint.yml | 3 ++- CONTRIBUTING.md | 17 ++++++++++++----- 3 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/otel-export.yml diff --git a/.github/workflows/otel-export.yml b/.github/workflows/otel-export.yml new file mode 100644 index 000000000..5343f43b6 --- /dev/null +++ b/.github/workflows/otel-export.yml @@ -0,0 +1,25 @@ +--- +name: Export CI/CD Traces to Scout +"on": + workflow_run: + workflows: ["*"] + types: + - completed +jobs: + otel-export: + runs-on: ubuntu-latest + steps: + - name: Export workflow trace + uses: base-14/otel-cicd-action@v1.0.0 + with: + otlpEndpoint: ${{ secrets.SCOUT_OTLP_ENDPOINT }} + otelServiceName: cdk-terrain-ci + githubToken: ${{ secrets.GITHUB_TOKEN }} + runId: ${{ github.event.workflow_run.id }} + tokenUrl: >- + https://id.b14.dev/realms/${{ + secrets.SCOUT_TENANT + }}/protocol/openid-connect/token + appName: ${{ secrets.SCOUT_CLIENT_ID }} + apiKey: ${{ secrets.SCOUT_CLIENT_SECRET }} + audience: b14collector diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml index c19e9608c..214645a10 100644 --- a/.github/workflows/pr-lint.yml +++ b/.github/workflows/pr-lint.yml @@ -41,6 +41,7 @@ jobs: docs release deps + gha # Configure that a scope must always be provided. requireScope: false # When using "Squash and merge" on a PR with only one commit, GitHub @@ -52,6 +53,6 @@ jobs: subjectPatternError: | The subject "{subject}" found in the pull request title "{title}" does not match the required format. The format is "type(scope): message", supported types are feat, fix, chore, refactor, revert. - The supported scopes are lib, cli, hcl2json, tests, examples, readme, docs, release, deps. + The supported scopes are lib, cli, hcl2json, tests, examples, readme, docs, release, deps, gha. Please stick to the format so that our automatic release process picks your commit up and your code makes it into the next release. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1f9bb4931..8af29082e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -81,11 +81,18 @@ Ensuring your PR titles follow this format helps us quickly identify the purpose #### Affected Component: -- cli -- lib -- hcl2cdk -- provider-generator -- examples +- **cli** — CLI tool (`cdktn-cli`) +- **lib** — Core library (`cdktn`) +- **hcl2cdk** — HCL to CDK converter +- **hcl2json** — WASM-based HCL parser +- **provider-generator** — Provider binding generator +- **examples** — Example projects +- **tests** — Test infrastructure +- **docs** — Documentation +- **readme** — README updates +- **release** — Release process and configuration +- **deps** — Dependency updates +- **gha** — GitHub Actions workflows ## Prerequisites