forked from open-telemetry/opentelemetry-demo
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d5add0c
commit 5806b89
Showing
130 changed files
with
8,790 additions
and
17,778 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT PUSH CHANGES OF THIS FILE TO opentelemetry/opentelemetry-demo | ||
# PLACE YOUR .env ENVIRONMENT VARIABLES OVERRIDES IN THIS FILE |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
# 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 | ||
|
||
jobs: | ||
build_and_push_images: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
env: | ||
RELEASE_VERSION: "${{ github.event.release.tag_name }}" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
file_tag: | ||
- file: ./src/accountingservice/Dockerfile | ||
tag_suffix: accountingservice | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/adservice/Dockerfile | ||
tag_suffix: adservice | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/cartservice/src/Dockerfile | ||
tag_suffix: cartservice | ||
context: ./ | ||
setup-qemu: false | ||
- file: ./src/checkoutservice/Dockerfile | ||
tag_suffix: checkoutservice | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/currencyservice/Dockerfile | ||
tag_suffix: currencyservice | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/emailservice/Dockerfile | ||
tag_suffix: emailservice | ||
context: ./src/emailservice | ||
setup-qemu: true | ||
- file: ./src/frauddetectionservice/Dockerfile | ||
tag_suffix: frauddetectionservice | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/frontend/Dockerfile | ||
tag_suffix: frontend | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/frontendproxy/Dockerfile | ||
tag_suffix: frontendproxy | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/frontend/Dockerfile.cypress | ||
tag_suffix: frontend-tests | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/imageprovider/Dockerfile | ||
tag_suffix: imageprovider | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/kafka/Dockerfile | ||
tag_suffix: kafka | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/loadgenerator/Dockerfile | ||
tag_suffix: loadgenerator | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/paymentservice/Dockerfile | ||
tag_suffix: paymentservice | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/productcatalogservice/Dockerfile | ||
tag_suffix: productcatalogservice | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/quoteservice/Dockerfile | ||
tag_suffix: quoteservice | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/recommendationservice/Dockerfile | ||
tag_suffix: recommendationservice | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./src/shippingservice/Dockerfile | ||
tag_suffix: shippingservice | ||
context: ./ | ||
setup-qemu: true | ||
- file: ./test/tracetesting/Dockerfile | ||
tag_suffix: traceBasedTests | ||
context: ./ | ||
setup-qemu: true | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- 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@v5.4.0 | ||
with: | ||
context: ${{ matrix.file_tag.context }} | ||
file: ${{ matrix.file_tag.file }} | ||
platforms: linux/amd64,linux/arm64 | ||
push: ${{ inputs.push }} | ||
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 |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# 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] | ||
|
||
jobs: | ||
label: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check for changed files | ||
id: file_changes | ||
uses: dorny/paths-filter@v2 | ||
with: | ||
list-files: shell | ||
filters: | | ||
docsUpdateRequired: | ||
- 'src/flagd/**' | ||
helmUpdateRequired: | ||
- '.env' | ||
- 'docker-compose*.yml' | ||
- 'src/flagd/**' | ||
- 'src/grafana/**' | ||
- 'src/otelcollector/**' | ||
- 'src/prometheus/**' | ||
- name: "Add Label: docs-update-required" | ||
if: steps.file_changes.outputs.docsUpdateRequired == 'true' | ||
uses: actions/github-script@v7 | ||
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@v7 | ||
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'] | ||
}) |
This file contains 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
This file contains 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
Oops, something went wrong.