summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/CODEOWNERS5
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md40
-rw-r--r--.github/ISSUE_TEMPLATE/feature_request.md31
-rw-r--r--.github/ISSUE_TEMPLATE/question.md11
-rw-r--r--.github/PULL_REQUEST_TEMPLATE.md30
-rw-r--r--.github/component_owners.yml8
-rw-r--r--.github/dependabot.yml90
-rw-r--r--.github/workflows/assign-reviewers.yml26
-rw-r--r--.github/workflows/build-images.yml20
-rw-r--r--.github/workflows/checks.yml83
-rw-r--r--.github/workflows/component-build-images.yml219
-rw-r--r--.github/workflows/dependabot-auto-update-protobuf-diff.yml35
-rw-r--r--.github/workflows/fossa.yml23
-rw-r--r--.github/workflows/gradle-wrapper-validation.yml21
-rw-r--r--.github/workflows/label-pr.yml63
-rw-r--r--.github/workflows/nightly-release.yml23
-rw-r--r--.github/workflows/ossf-scorecard.yml50
-rw-r--r--.github/workflows/release.yml22
-rw-r--r--.github/workflows/run-integration-tests.yml23
-rw-r--r--.github/workflows/stale.yml29
20 files changed, 852 insertions, 0 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 0000000..9f88832
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,5 @@
+# Code owners file.
+# This file controls who is tagged for review for any given pull request.
+
+# For anything not explicitly taken by someone else:
+* @open-telemetry/demo-approvers
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..3a637d2
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,40 @@
+---
+name: Bug Report
+about: Create a report to help us improve
+labels: bug
+---
+
+# Bug Report
+
+Which version of the demo you are using? (please provide either a specific
+[commit
+hash](https://github.com/open-telemetry/opentelemetry-demo/commits/main)
+or a specific
+[release](https://github.com/open-telemetry/opentelemetry-demo/releases)).
+
+## Symptom
+
+A clear and concise description of what the bug is.
+
+**What is the expected behavior?**
+
+What do you expect to see?
+
+**What is the actual behavior?**
+
+Please describe the actual behavior experienced.
+
+## Reproduce
+
+Could you provide the minimum required steps to resolve the issue you're seeing?
+
+We will close this issue if:
+
+* The steps you provided are complex.
+* If we can not reproduce the behavior you're reporting.
+
+## Additional Context
+
+Please feel free to add any other context about the problem here.
+
+<sub>**Tip**: [React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it. Learn more [here](https://opentelemetry.io/community/end-user/issue-participation/).</sub>
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..de6772c
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,31 @@
+---
+name: Feature Request
+about: Suggest an idea for this project
+labels: enhancement
+---
+
+# Feature Request
+
+Before opening a feature request against this repo, consider whether the feature
+should/could be implemented in the [other OpenTelemetry client
+libraries](https://github.com/open-telemetry/). If so, please [open an issue on
+opentelemetry-specification](https://github.com/open-telemetry/opentelemetry-specification/issues/new)
+first.
+
+**Is your feature request related to a problem?**
+
+If so, provide a concise description of the problem.
+
+**Describe the solution you'd like:**
+
+What would you like to happen instead? What is the expected behavior?
+
+**Describe alternatives you've considered.**
+
+Which alternative solutions or features have you considered?
+
+## Additional Context
+
+Feel free to add any other context about the feature request here.
+
+<sub>**Tip**: [React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it. Learn more [here](https://opentelemetry.io/community/end-user/issue-participation/).</sub>
diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md
new file mode 100644
index 0000000..6c0c0b0
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/question.md
@@ -0,0 +1,11 @@
+---
+name: Question
+about: Create a question to help us improve our knowledge base and documentation
+labels: question
+---
+
+# Question
+
+Use [Github Discussions](https://github.com/open-telemetry/opentelemetry-demo/discussions/).
+
+<sub>**Tip**: [React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it. Learn more [here](https://opentelemetry.io/community/end-user/issue-participation/).</sub>
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..5a41f31
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,30 @@
+# Changes
+
+Please provide a brief description of the changes here.
+
+## Merge Requirements
+
+For new features contributions, please make sure you have completed the following
+essential items:
+
+* [ ] `CHANGELOG.md` updated to document new feature additions
+* [ ] Appropriate documentation updates in the [docs][]
+* [ ] Appropriate Helm chart updates in the [helm-charts][]
+
+<!--
+A Pull Request that modifies instrumentation code will likely require an
+update in docs. Please make sure to update the opentelemetry.io repo with any
+docs changes.
+
+A Pull Request that modifies docker-compose.yaml, otelcol-config.yaml, or
+Grafana dashboards will likely require an update to the Demo Helm chart.
+Other changes affecting how a service is deployed will also likely require an
+update to the Demo Helm chart.
+-->
+
+Maintainers will not merge until the above have been completed. If you're unsure
+which docs need to be changed ping the
+[@open-telemetry/demo-approvers](https://github.com/orgs/open-telemetry/teams/demo-approvers).
+
+[docs]: https://opentelemetry.io/docs/demo/
+[helm-charts]: https://github.com/open-telemetry/opentelemetry-helm-charts
diff --git a/.github/component_owners.yml b/.github/component_owners.yml
new file mode 100644
index 0000000..b96dd2f
--- /dev/null
+++ b/.github/component_owners.yml
@@ -0,0 +1,8 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+# this file is used by .github/workflows/assign-reviewers.yml
+components:
+ src/ad:
+ - jack-berg
+ - mateuszrzeszutek
+ - trask
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..cc1ac0d
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,90 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directories:
+ - "/"
+ groups:
+ actions-production-dependencies:
+ dependency-type: "production"
+ schedule:
+ interval: "daily"
+ - package-ecosystem: "gomod"
+ directories:
+ - "/src/**/*"
+ groups:
+ go-production-dependencies:
+ dependency-type: "production"
+ schedule:
+ interval: "daily"
+ - package-ecosystem: "gradle"
+ directories:
+ - "/src/**/*"
+ groups:
+ gradle-production-dependencies:
+ dependency-type: "production"
+ schedule:
+ interval: "daily"
+ - package-ecosystem: "pip"
+ directories:
+ - "/src/**/*"
+ groups:
+ pip-production-dependencies:
+ dependency-type: "production"
+ schedule:
+ interval: "daily"
+ - package-ecosystem: "nuget"
+ directories:
+ - "/src/**/*"
+ groups:
+ nuget-production-dependencies:
+ dependency-type: "production"
+ schedule:
+ interval: "daily"
+ - package-ecosystem: "composer"
+ directories:
+ - "/src/**/*"
+ groups:
+ composer-production-dependencies:
+ dependency-type: "production"
+ schedule:
+ interval: "daily"
+ - package-ecosystem: "npm"
+ directories:
+ - "/"
+ - "/src/frontend/*"
+ - "/src/payment/*"
+ groups:
+ npm-production-dependencies:
+ dependency-type: "production"
+ npm-development-dependencies:
+ dependency-type: "development"
+ schedule:
+ interval: "daily"
+ - package-ecosystem: "cargo"
+ directories:
+ - "/src/shipping/*"
+ groups:
+ cargo-production-dependencies:
+ dependency-type: "production"
+ schedule:
+ interval: "daily"
+ - package-ecosystem: "bundler"
+ directories:
+ - "/src/email/*"
+ groups:
+ bundler-production-dependencies:
+ dependency-type: "production"
+ bundler-development-dependencies:
+ dependency-type: "development"
+ schedule:
+ interval: "daily"
+ - package-ecosystem: "mix"
+ directories:
+ - "/src/flagd-ui/*"
+ groups:
+ mix-production-dependencies:
+ dependency-type: "production"
+ schedule:
+ interval: "daily"
diff --git a/.github/workflows/assign-reviewers.yml b/.github/workflows/assign-reviewers.yml
new file mode 100644
index 0000000..8ede7ab
--- /dev/null
+++ b/.github/workflows/assign-reviewers.yml
@@ -0,0 +1,26 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+# assigns reviewers to pull requests in a similar way as CODEOWNERS, but doesn't require reviewers
+# to have write access to the repository
+# see .github/component_owners.yaml for the list of components and their owners
+name: Assign reviewers
+
+on:
+ # pull_request_target is needed instead of just pull_request
+ # because repository write permission is needed to assign reviewers
+ pull_request_target:
+
+permissions:
+ contents: read
+
+jobs:
+ assign-reviewers:
+ permissions:
+ pull-requests: write # required for assigning reviewers to PRs
+ if: github.repository == 'open-telemetry/opentelemetry-demo'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: dyladan/component-owners@main
+ with:
+ # using this action to request review only (not assignment)
+ assign-owners: false
diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml
new file mode 100644
index 0000000..b37fea8
--- /dev/null
+++ b/.github/workflows/build-images.yml
@@ -0,0 +1,20 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+name: Test image generation
+
+on:
+ push:
+ paths:
+ - 'src/**'
+ - 'test/**'
+
+permissions:
+ contents: read
+
+jobs:
+ build_images:
+ permissions:
+ contents: read
+ packages: write
+ if: github.repository == 'open-telemetry/opentelemetry-demo'
+ uses: ./.github/workflows/component-build-images.yml
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
new file mode 100644
index 0000000..b6fb10d
--- /dev/null
+++ b/.github/workflows/checks.yml
@@ -0,0 +1,83 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+name: Checks
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ branches: [main]
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ build_images:
+ permissions: # required by the reusable workflow
+ contents: read
+ packages: write
+ uses: ./.github/workflows/component-build-images.yml
+ with:
+ push: false
+ version: 'dev'
+
+ markdownlint:
+ runs-on: ubuntu-latest
+ steps:
+ - name: check out code
+ uses: actions/checkout@v5
+ - name: install dependencies
+ run: npm install
+ - name: run markdownlint
+ run: make markdownlint
+
+ yamllint:
+ runs-on: ubuntu-latest
+ steps:
+ - name: check out code
+ uses: actions/checkout@v5
+ - uses: actions/setup-python@v6
+ with:
+ python-version: '3.x'
+ - name: install yamllint
+ run: make install-yamllint
+ - name: run yamllint
+ run: yamllint . -f github
+
+ misspell:
+ runs-on: ubuntu-latest
+ steps:
+ - name: check out code
+ uses: actions/checkout@v5
+ - name: run misspell
+ run: make misspell
+
+ checklinks:
+ name: linkspector
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v5
+ - name: Run linkspector
+ uses: umbrelladocs/action-linkspector@v1
+ with:
+ level: info
+ fail_level: any
+ config_file: '.linkspector.yml'
+
+ sanity:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v5
+ - name: run sanitycheck.py
+ run: python3 ./internal/tools/sanitycheck.py
+
+ checklicense:
+ runs-on: ubuntu-latest
+ steps:
+ - name: check out code
+ uses: actions/checkout@v5
+ - name: install tools
+ run: make install-tools
+ - name: run checklicense
+ run: make checklicense
diff --git a/.github/workflows/component-build-images.yml b/.github/workflows/component-build-images.yml
new file mode 100644
index 0000000..a4c9544
--- /dev/null
+++ b/.github/workflows/component-build-images.yml
@@ -0,0 +1,219 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+
+on:
+ workflow_call:
+ inputs:
+ push:
+ description: Should the images be pushed
+ default: false
+ required: false
+ type: boolean
+ version:
+ description: The version used when tagging the image
+ default: 'dev'
+ required: false
+ type: string
+ dockerhub_repo:
+ description: Docker Hub repository
+ default: 'otel/demo'
+ required: false
+ type: string
+ ghcr_repo:
+ description: GHCR repository
+ default: 'ghcr.io/open-telemetry/demo'
+ required: false
+ type: string
+
+permissions:
+ contents: read
+
+jobs:
+ protobufcheck:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v5
+ - name: Generate
+ run: make clean docker-generate-protobuf
+ - name: Check Clean Work Tree
+ run: make check-clean-work-tree
+
+ build_and_push_images:
+ runs-on: ubuntu-latest
+ needs: protobufcheck
+
+ permissions:
+ contents: read
+ packages: write
+
+ env:
+ RELEASE_VERSION: "${{ github.event.release.tag_name }}"
+
+ strategy:
+ fail-fast: false
+ matrix:
+ file_tag:
+ - file: ./src/accounting/Dockerfile
+ tag_suffix: accounting
+ context: ./
+ setup-qemu: true
+ - file: ./src/ad/Dockerfile
+ tag_suffix: ad
+ context: ./
+ setup-qemu: true
+ - file: ./src/cart/src/Dockerfile
+ tag_suffix: cart
+ context: ./
+ setup-qemu: false
+ - file: ./src/checkout/Dockerfile
+ tag_suffix: checkout
+ context: ./
+ setup-qemu: true
+ - file: ./src/currency/Dockerfile
+ tag_suffix: currency
+ context: ./
+ setup-qemu: true
+ - file: ./src/email/Dockerfile
+ tag_suffix: email
+ context: ./
+ setup-qemu: true
+ - file: ./src/flagd-ui/Dockerfile
+ tag_suffix: flagd-ui
+ context: ./
+ setup-qemu: true
+ - file: ./src/fraud-detection/Dockerfile
+ tag_suffix: fraud-detection
+ context: ./
+ setup-qemu: true
+ - file: ./src/frontend/Dockerfile
+ tag_suffix: frontend
+ context: ./
+ setup-qemu: true
+ - file: ./src/frontend-proxy/Dockerfile
+ tag_suffix: frontend-proxy
+ context: ./
+ setup-qemu: true
+ - file: ./src/frontend/Dockerfile.cypress
+ tag_suffix: frontend-tests
+ context: ./
+ setup-qemu: true
+ - file: ./src/image-provider/Dockerfile
+ tag_suffix: image-provider
+ context: ./
+ setup-qemu: true
+ - file: ./src/kafka/Dockerfile
+ tag_suffix: kafka
+ context: ./
+ setup-qemu: true
+ - file: ./src/load-generator/Dockerfile
+ tag_suffix: load-generator
+ context: ./
+ setup-qemu: true
+ - file: ./src/opensearch/Dockerfile
+ tag_suffix: opensearch
+ context: ./
+ setup-qemu: true
+ - file: ./src/payment/Dockerfile
+ tag_suffix: payment
+ context: ./
+ setup-qemu: true
+ - file: ./src/postgres/Dockerfile
+ tag_suffix: postgresql
+ context: ./
+ setup-qemu: true
+ - file: ./src/product-catalog/Dockerfile
+ tag_suffix: product-catalog
+ context: ./
+ setup-qemu: true
+ - file: ./src/quote/Dockerfile
+ tag_suffix: quote
+ context: ./
+ setup-qemu: true
+ - file: ./src/recommendation/Dockerfile
+ tag_suffix: recommendation
+ context: ./
+ setup-qemu: true
+ - file: ./src/shipping/Dockerfile
+ tag_suffix: shipping
+ context: ./
+ setup-qemu: true
+ - file: ./test/tracetesting/Dockerfile
+ tag_suffix: traceBasedTests
+ context: ./
+ setup-qemu: true
+
+ steps:
+ - uses: actions/checkout@v5
+ with:
+ fetch-depth: 0
+ - name: Load environment variables from .env file
+ run: |
+ if [ -f .env ]; then
+ # Filter out comments and empty lines, then add each variable to $GITHUB_ENV
+ grep -vE '^\s*#|^\s*$' .env | while read -r line; do
+ echo "$line" >> $GITHUB_ENV
+ done
+ else
+ echo ".env file not found!"
+ exit 1
+ fi
+ - name: Check for changes and set push options
+ id: check_changes
+ run: |
+ DOCKERFILE_DIR=$(dirname ${{ matrix.file_tag.file }})
+ FILES_CHANGED=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- $DOCKERFILE_DIR)
+ FORCE_PUSH=${{ inputs.push }}
+ if [ "$FORCE_PUSH" = true ]; then
+ echo "Force push is enabled, proceeding with build."
+ echo "skip=false" >> "$GITHUB_OUTPUT"
+ elif [ -z "$FILES_CHANGED" ]; then
+ echo "No changes in ${{ matrix.file_tag.context }}, skipping build."
+ echo "skip=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "Changes detected in ${{ matrix.file_tag.context }}, proceeding with build."
+ echo "skip=false" >> "$GITHUB_OUTPUT"
+ fi
+ - name: Log in to the Container registry
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+ if: ${{ inputs.push }}
+ - name: Log in to Docker Hub
+ uses: docker/login-action@v3
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+ if: ${{ inputs.push }}
+ - name: Set up QEMU
+ if: ${{ matrix.file_tag.setup-qemu }}
+ uses: docker/setup-qemu-action@v3
+ with:
+ image: tonistiigi/binfmt:master
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+ with:
+ buildkitd-config-inline: |
+ [worker.oci]
+ max-parallelism = 2
+ - name: Matrix Build and push demo images
+ if: steps.check_changes.outputs.skip == 'false'
+ uses: docker/build-push-action@v6.18.0
+ with:
+ context: ${{ matrix.file_tag.context }}
+ file: ${{ matrix.file_tag.file }}
+ platforms: linux/amd64,linux/arm64
+ push: ${{ inputs.push }}
+ build-args: |
+ OTEL_JAVA_AGENT_VERSION=${{ env.OTEL_JAVA_AGENT_VERSION }}
+ OPENTELEMETRY_CPP_VERSION=${{ env.OPENTELEMETRY_CPP_VERSION }}
+ TRACETEST_IMAGE_VERSION=${{ env.TRACETEST_IMAGE_VERSION }}
+ tags: |
+ ${{ inputs.dockerhub_repo }}:${{ inputs.version }}-${{matrix.file_tag.tag_suffix }}
+ ${{ inputs.dockerhub_repo }}:latest-${{matrix.file_tag.tag_suffix }}
+ ${{ inputs.ghcr_repo }}:${{ inputs.version }}-${{ matrix.file_tag.tag_suffix }}
+ ${{ inputs.ghcr_repo }}:latest-${{ matrix.file_tag.tag_suffix }}
+ cache-from: type=gha
+ cache-to: type=gha
diff --git a/.github/workflows/dependabot-auto-update-protobuf-diff.yml b/.github/workflows/dependabot-auto-update-protobuf-diff.yml
new file mode 100644
index 0000000..96dd1bd
--- /dev/null
+++ b/.github/workflows/dependabot-auto-update-protobuf-diff.yml
@@ -0,0 +1,35 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+
+on:
+ pull_request:
+ branches: [ main ]
+
+permissions:
+ contents: read
+
+jobs:
+ dependabot-auto-update-protobuf-diff:
+ permissions:
+ contents: write
+ pull-requests: write
+ runs-on: ubuntu-latest
+ # Only run this job if the PR is opened by dependabot and the last commit is from dependabot
+ if: github.event.pull_request.user.login == 'dependabot[bot]'
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v5
+ with:
+ ref: ${{ github.head_ref }}
+ token: ${{ secrets.DEPENDABOT_TOKEN }}
+ - name: Generate
+ run: make clean docker-generate-protobuf
+ - name: Commit only if there are changes
+ run: |
+ if ! git diff --quiet; then
+ git config user.name "dependabot[bot]"
+ git config user.email "49699333+dependabot[bot]@users.noreply.github.com"
+ git add .
+ git commit -s -m "chore: update protobuf"
+ git push
+ fi
diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml
new file mode 100644
index 0000000..9c79918
--- /dev/null
+++ b/.github/workflows/fossa.yml
@@ -0,0 +1,23 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+
+name: FOSSA scanning
+
+on:
+ push:
+ branches:
+ - main
+
+permissions:
+ contents: read
+
+jobs:
+ fossa:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+
+ - uses: fossas/fossa-action@3ebcea1862c6ffbd5cf1b4d0bd6b3fe7bd6f2cac # v1.7.0
+ with:
+ api-key: ${{secrets.FOSSA_API_KEY}}
+ team: OpenTelemetry
diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml
new file mode 100644
index 0000000..6bc5888
--- /dev/null
+++ b/.github/workflows/gradle-wrapper-validation.yml
@@ -0,0 +1,21 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+name: Gradle wrapper validation
+on:
+ pull_request:
+ paths:
+ - '**/gradle/wrapper/**'
+ push:
+ paths:
+ - '**/gradle/wrapper/**'
+
+permissions:
+ contents: read
+
+jobs:
+ validation:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v5
+
+ - uses: gradle/actions/wrapper-validation@v4.4.3
diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml
new file mode 100644
index 0000000..f9273e8
--- /dev/null
+++ b/.github/workflows/label-pr.yml
@@ -0,0 +1,63 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+# adds a label to a pull request if certain files are changed
+name: Label Pull Requests
+
+on:
+ pull_request_target:
+ types: [opened, synchronize, reopened]
+
+permissions:
+ contents: read
+
+jobs:
+ label:
+ runs-on: ubuntu-latest
+ permissions:
+ pull-requests: write
+ contents: read
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v5
+
+ - name: Check for changed files
+ id: file_changes
+ uses: dorny/paths-filter@v3
+ with:
+ list-files: shell
+ filters: |
+ docsUpdateRequired:
+ - 'src/flagd/**'
+ helmUpdateRequired:
+ - '.env'
+ - 'docker-compose*.yml'
+ - 'src/flagd/**'
+ - 'src/grafana/**'
+ - 'src/otel-collector/**'
+ - 'src/prometheus/**'
+
+ - name: "Add Label: docs-update-required"
+ if: steps.file_changes.outputs.docsUpdateRequired == 'true'
+ uses: actions/github-script@v8
+ with:
+ script: |
+ const issue_number = context.issue.number;
+ github.rest.issues.addLabels({
+ issue_number: issue_number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ labels: ['docs-update-required']
+ })
+
+ - name: "Add Label: helm-update-required"
+ if: steps.file_changes.outputs.helmUpdateRequired == 'true'
+ uses: actions/github-script@v8
+ with:
+ script: |
+ const issue_number = context.issue.number;
+ github.rest.issues.addLabels({
+ issue_number: issue_number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ labels: ['helm-update-required']
+ })
diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml
new file mode 100644
index 0000000..c569af7
--- /dev/null
+++ b/.github/workflows/nightly-release.yml
@@ -0,0 +1,23 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+name: Nightly Release
+
+on:
+ schedule:
+ # Runs at 00:00 UTC every day
+ - cron: '0 0 * * *'
+
+permissions:
+ contents: read
+
+jobs:
+ build_and_push_images:
+ permissions: # required by the reusable workflow
+ contents: read
+ packages: write
+ uses: ./.github/workflows/component-build-images.yml
+ if: github.repository == 'open-telemetry/opentelemetry-demo'
+ with:
+ push: true
+ version: nightly-${{ github.run_id }}
+ secrets: inherit
diff --git a/.github/workflows/ossf-scorecard.yml b/.github/workflows/ossf-scorecard.yml
new file mode 100644
index 0000000..5e95e29
--- /dev/null
+++ b/.github/workflows/ossf-scorecard.yml
@@ -0,0 +1,50 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+
+name: OSSF Scorecard
+
+on:
+ push:
+ branches:
+ - main
+ schedule:
+ - cron: "25 11 * * 3" # once a week
+ workflow_dispatch:
+
+permissions: read-all
+
+jobs:
+ analysis:
+ runs-on: ubuntu-latest
+ permissions:
+ # Needed for Code scanning upload
+ security-events: write
+ # Needed for GitHub OIDC token if publish_results is true
+ id-token: write
+ steps:
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ with:
+ persist-credentials: false
+
+ - uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
+ with:
+ results_file: results.sarif
+ results_format: sarif
+ publish_results: true
+
+ # Upload the results as artifacts (optional). Commenting out will disable
+ # uploads of run results in SARIF format to the repository Actions tab.
+ # https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
+ - name: "Upload artifact"
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
+ with:
+ name: SARIF file
+ path: results.sarif
+ retention-days: 5
+
+ # Upload the results to GitHub's code scanning dashboard (optional).
+ # Commenting out will disable upload of results to your repo's Code Scanning dashboard
+ - name: "Upload to code-scanning"
+ uses: github/codeql-action/upload-sarif@192325c86100d080feab897ff886c34abd4c83a3 # v3.29.5
+ with:
+ sarif_file: results.sarif
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..60eb1b6
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,22 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+name: "Build and Publish"
+
+on:
+ release:
+ types: [published]
+
+permissions:
+ contents: read
+
+jobs:
+ build_and_push_images:
+ permissions: # required by the reusable workflow
+ contents: read
+ packages: write
+ uses: ./.github/workflows/component-build-images.yml
+ if: github.repository == 'open-telemetry/opentelemetry-demo'
+ with:
+ push: true
+ version: ${{ github.event.release.tag_name }}
+ secrets: inherit
diff --git a/.github/workflows/run-integration-tests.yml b/.github/workflows/run-integration-tests.yml
new file mode 100644
index 0000000..a64c774
--- /dev/null
+++ b/.github/workflows/run-integration-tests.yml
@@ -0,0 +1,23 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+name: Integration Tests
+
+on:
+ pull_request_review:
+ types:
+ - submitted
+
+permissions:
+ contents: read
+
+jobs:
+ run_tests:
+ runs-on: ubuntu-latest
+ name: "Run CI"
+ if: github.event.review.state == 'APPROVED'
+ steps:
+ - name: check out code
+ uses: actions/checkout@v5
+ - name: run tracetesting
+ run: |
+ make build && docker system prune -f && make run-tracetesting
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
new file mode 100644
index 0000000..eab3dee
--- /dev/null
+++ b/.github/workflows/stale.yml
@@ -0,0 +1,29 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+# Syntax: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
+# Github Actions Stale: https://github.com/actions/stale
+
+name: "Close stale pull requests"
+on:
+ schedule:
+ - cron: "12 3 * * *" # arbitrary time not to DDOS GitHub
+
+permissions:
+ contents: read
+
+jobs:
+ stale:
+ permissions:
+ issues: write # for actions/stale to close stale issues
+ pull-requests: write # for actions/stale to close stale PRs
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/stale@v10
+ with:
+ stale-pr-message: 'This PR was marked stale due to lack of activity. It will be closed in 7 days.'
+ close-pr-message: 'Closed as inactive. Feel free to reopen if this PR is still being worked on.'
+ operations-per-run: 400
+ days-before-pr-stale: 7
+ days-before-issue-stale: -1
+ days-before-pr-close: 7
+ days-before-issue-close: -1