Skip to content

Commit

Permalink
Move current build args to .env file
Browse files Browse the repository at this point in the history
  • Loading branch information
julianocosta89 committed Nov 6, 2024
1 parent e93bb8f commit 1923d1b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 8 deletions.
13 changes: 7 additions & 6 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@ IMAGE_VERSION=1.12.0
IMAGE_NAME=ghcr.io/open-telemetry/demo
DEMO_VERSION=latest

# Build Args
TRACETEST_IMAGE_VERSION=v1.5.2
OTEL_JAVA_AGENT_VERSION=2.9.0
OPENTELEMETRY_CPP_VERSION=1.17.0

# Dependent images
COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.108.0
FLAGD_IMAGE=ghcr.io/open-feature/flagd:v0.11.2
GRAFANA_IMAGE=grafana/grafana:11.3.0
JAEGERTRACING_IMAGE=jaegertracing/all-in-one:1.60
# must also update version field in
# must also update version field in src/grafana/provisioning/datasources/opensearch.yaml
OPENSEARCH_IMAGE=opensearchproject/opensearch:2.17.1
POSTGRES_IMAGE=postgres:16.4
PROMETHEUS_IMAGE=quay.io/prometheus/prometheus:v2.54.1
VALKEY_IMAGE=valkey/valkey:8.0-alpine
# must also update the version arg in ./test/tracetesting/Dockerfile
TRACETEST_IMAGE=kubeshop/tracetest:v1.5.2

# Build Args
OTEL_JAVA_AGENT_VERSION=2.9.0
TRACETEST_IMAGE=kubeshop/tracetest:${TRACETEST_IMAGE_VERSION}

# Demo Platform
ENV_PLATFORM=local
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/component-build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ jobs:
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 }}
Expand Down
2 changes: 2 additions & 0 deletions docker-compose-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ services:
build:
context: ./
dockerfile: ./test/tracetesting/Dockerfile
args:
TRACETEST_IMAGE_VERSION: ${TRACETEST_IMAGE_VERSION}

Check failure on line 38 in docker-compose-tests.yml

View workflow job for this annotation

GitHub Actions / yamllint

38:9 [indentation] wrong indentation: expected 6 but found 8
environment:
- AD_SERVICE_ADDR
- CART_SERVICE_ADDR
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ services:
dockerfile: ${AD_SERVICE_DOCKERFILE}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-adservice
args:
OTEL_JAVA_AGENT_VERSION: ${OTEL_JAVA_AGENT_VERSION}
deploy:
resources:
limits:
Expand Down Expand Up @@ -133,6 +135,8 @@ services:
dockerfile: ${CURRENCY_SERVICE_DOCKERFILE}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice
args:
OPENTELEMETRY_CPP_VERSION: ${OPENTELEMETRY_CPP_VERSION}
deploy:
resources:
limits:
Expand Down
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ services:
dockerfile: ${AD_SERVICE_DOCKERFILE}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-adservice
args:
OTEL_JAVA_AGENT_VERSION: ${OTEL_JAVA_AGENT_VERSION}
deploy:
resources:
limits:
Expand Down Expand Up @@ -171,6 +173,8 @@ services:
dockerfile: ${CURRENCY_SERVICE_DOCKERFILE}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-currencyservice
args:
OPENTELEMETRY_CPP_VERSION: ${OPENTELEMETRY_CPP_VERSION}
deploy:
resources:
limits:
Expand Down Expand Up @@ -224,6 +228,8 @@ services:
dockerfile: ${FRAUD_SERVICE_DOCKERFILE}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice
args:
OTEL_JAVA_AGENT_VERSION: ${OTEL_JAVA_AGENT_VERSION}
deploy:
resources:
limits:
Expand Down Expand Up @@ -637,6 +643,8 @@ services:
dockerfile: ${KAFKA_SERVICE_DOCKERFILE}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-kafka
args:
OTEL_JAVA_AGENT_VERSION: ${OTEL_JAVA_AGENT_VERSION}
deploy:
resources:
limits:
Expand Down
2 changes: 1 addition & 1 deletion src/currencyservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FROM alpine:3.18 as builder

RUN apk update && apk add git cmake make g++ grpc-dev protobuf-dev linux-headers

ARG OPENTELEMETRY_CPP_VERSION=1.15.0
ARG OPENTELEMETRY_CPP_VERSION

RUN git clone https://github.com/open-telemetry/opentelemetry-cpp \
&& cd opentelemetry-cpp/ \
Expand Down
2 changes: 1 addition & 1 deletion test/tracetesting/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM alpine
WORKDIR /app

# The build-images workflow action does not set a build-arg so we need to specify a default value here
ARG TRACETEST_IMAGE_VERSION=v1.5.2
ARG TRACETEST_IMAGE_VERSION

RUN apk --update add bash jq curl
RUN curl -L https://raw.githubusercontent.com/kubeshop/tracetest/main/install-cli.sh | bash -s -- $TRACETEST_IMAGE_VERSION
Expand Down

0 comments on commit 1923d1b

Please sign in to comment.