Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/upstream/main'
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/frontend/package-lock.json
#	src/frontend/package.json
#	src/frontend/pages/_app.tsx
  • Loading branch information
puckpuck committed Jun 7, 2024
2 parents 3621387 + 9dc4a67 commit 70fdb04
Show file tree
Hide file tree
Showing 59 changed files with 1,483 additions and 1,443 deletions.
20 changes: 11 additions & 9 deletions .env
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@


# Demo App version
IMAGE_VERSION=1.9.0
IMAGE_VERSION=1.10.0
IMAGE_NAME=ghcr.io/open-telemetry/demo
DEMO_VERSION=latest

# Dependent images
COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.100.0
GRAFANA_IMAGE=grafana/grafana:10.4.2
JAEGERTRACING_IMAGE=jaegertracing/all-in-one:1.55
COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.102.1
FLAGD_IMAGE=ghcr.io/open-feature/flagd:v0.10.2
GRAFANA_IMAGE=grafana/grafana:10.4.3
JAEGERTRACING_IMAGE=jaegertracing/all-in-one:1.57
# must also update version field in ./src/grafana/provisioning/datasources/opensearch.yml
OPENSEARCH_IMAGE=opensearchproject/opensearch:2.13.0
POSTGRES_IMAGE=postgres:16.2
PROMETHEUS_IMAGE=quay.io/prometheus/prometheus:v2.51.2
OPENSEARCH_IMAGE=opensearchproject/opensearch:2.14.0
POSTGRES_IMAGE=postgres:16.3
PROMETHEUS_IMAGE=quay.io/prometheus/prometheus:v2.52.0
REDIS_IMAGE=redis:7.2-alpine
TRACETEST_IMAGE=kubeshop/tracetest:v1.0.0
# must also update the version arg in ./test/tracetesting/Dockerfile
TRACETEST_IMAGE=kubeshop/tracetest:v1.3.0

# Demo Platform
ENV_PLATFORM=local
Expand All @@ -27,7 +29,7 @@ OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_
PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:8080/otlp-http/v1/traces

# OpenTelemetry Resource Definitions
OTEL_RESOURCE_ATTRIBUTES="service.namespace=opentelemetry-demo"
OTEL_RESOURCE_ATTRIBUTES=service.namespace=opentelemetry-demo,service.version=${IMAGE_VERSION}

# Metrics Temporality
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=cumulative
Expand Down
2 changes: 2 additions & 0 deletions .env.override
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
166 changes: 3 additions & 163 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
@@ -1,174 +1,14 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
name: Test image generation

on:
push:
paths:
- 'src/**'
- 'test/**'
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

jobs:
build_and_push_images:
build_images:
if: github.repository == 'open-telemetry/opentelemetry-demo'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

env:
RELEASE_VERSION: "${{ github.event.release.tag_name }}"
DOCKERHUB_REPO: "otel/demo"
GHCR_REPO: "ghcr.io/open-telemetry/demo"

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:
config-inline: |
[worker.oci]
max-parallelism = 2
- name: Matrix Build and push demo images
if: steps.check_changes.outputs.skip == 'false'
uses: docker/[email protected]
with:
context: ${{ matrix.file_tag.context }}
file: ${{ matrix.file_tag.file }}
platforms: linux/amd64,linux/arm64
push: ${{ inputs.push }}
tags: |
${{ env.DOCKERHUB_REPO }}:${{ inputs.version }}-${{matrix.file_tag.tag_suffix }}
${{ env.DOCKERHUB_REPO }}:latest-${{matrix.file_tag.tag_suffix }}
${{ env.GHCR_REPO }}:${{ inputs.version }}-${{ matrix.file_tag.tag_suffix }}
${{ env.GHCR_REPO }}:latest-${{ matrix.file_tag.tag_suffix }}
cache-from: type=gha
cache-to: type=gha
uses: ./.github/workflows/component_build_images.yml
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build_images:
uses: ./.github/workflows/build-images.yml
uses: ./.github/workflows/component_build-images.yml
with:
push: false
version: 'dev'
Expand Down
Loading

0 comments on commit 70fdb04

Please sign in to comment.