diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index d83e735..10f8e01 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -1,4 +1,4 @@
-FROM maven:3-eclipse-temurin-21 AS dind
+FROM maven:3-eclipse-temurin-21 AS dind
ARG DEBIAN_FRONTEND=noninteractive
ENV PIP_ROOT_USER_ACTION=ignore
diff --git a/.github/workflows/provide-docker-images.yml b/.github/workflows/provide-docker-images.yml
new file mode 100644
index 0000000..b46ad2e
--- /dev/null
+++ b/.github/workflows/provide-docker-images.yml
@@ -0,0 +1,50 @@
+name: Provide needed docker images in ghcr.io
+
+on:
+ workflow_dispatch:
+ push:
+
+env:
+ REGISTRY_IMAGE: ghcr.io/lftraining/lfs148-code
+
+jobs:
+ retag_and_push:
+ name: Provide docker image ${{ matrix.image.namespace }}/${{ matrix.image.name }}:${{ matrix.image.tag }} on ghcr.io
+ runs-on: [ubuntu-latest]
+ strategy:
+ matrix:
+ image:
+ - name: todobackend-springboot
+ tag: v2404
+ namespace: maeddes
+ - name: todoui-thymeleaf
+ tag: v2404
+ namespace: maeddes
+ - name: todoui-flask
+ tag: v2404
+ namespace: maeddes
+ - name: simple-generator
+ tag: v2404
+ namespace: maeddes
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Login to GitHub Container Registry
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Pull image from Docker Hub
+ run: |
+ docker pull docker.io/${{ matrix.image.namespace }}/${{ matrix.image.name }}:${{ matrix.image.tag }}
+
+ - name: Retag the image for GitHub Container Registry
+ run: |
+ docker tag ${{ matrix.image.namespace }}/${{ matrix.image.name }}:${{ matrix.image.tag }} ${{ env.REGISTRY_IMAGE }}-${{ matrix.image.name }}:${{ matrix.image.tag }}
+
+ - name: Push image to GitHub Container Registry
+ run: |
+ docker push ${{ env.REGISTRY_IMAGE }}-${{ matrix.image.name }}:${{ matrix.image.tag }}
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 993cf53..2057efe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,6 @@
*.jar
settings.json
+.envrc
+.direnv
+.devenv
\ No newline at end of file
diff --git a/exercises/automatic-instrumentation/initial/todobackend-springboot/Dockerfile b/exercises/automatic-instrumentation/initial/todobackend-springboot/Dockerfile
index bcc02e7..5893092 100644
--- a/exercises/automatic-instrumentation/initial/todobackend-springboot/Dockerfile
+++ b/exercises/automatic-instrumentation/initial/todobackend-springboot/Dockerfile
@@ -1,4 +1,4 @@
-FROM docker.io/maven:3-eclipse-temurin-21 as build
+FROM docker.io/maven:3-eclipse-temurin-21 AS build
WORKDIR /workspace/app
COPY pom.xml .
diff --git a/exercises/automatic-instrumentation/initial/todobackend-springboot/pom.xml b/exercises/automatic-instrumentation/initial/todobackend-springboot/pom.xml
index efe02e6..c4869bc 100644
--- a/exercises/automatic-instrumentation/initial/todobackend-springboot/pom.xml
+++ b/exercises/automatic-instrumentation/initial/todobackend-springboot/pom.xml
@@ -15,7 +15,7 @@
todobackend-automatic
0.0.1-SNAPSHOT
todobackend-automatic
- Novatec Demo Application
+ Demo Application
21
@@ -53,6 +53,20 @@
org.springframework.boot
spring-boot-starter-test
test
+
+
+ org.mockito
+ mockito-core
+
+
+ net.bytebuddy
+ byte-buddy
+
+
+ net.bytebuddy
+ byte-buddy-agent
+
+
diff --git a/exercises/automatic-instrumentation/initial/todobackend-springboot/src/main/java/io/novatec/todobackend/TodobackendApplication.java b/exercises/automatic-instrumentation/initial/todobackend-springboot/src/main/java/io/novatec/todobackend/TodobackendApplication.java
index 5c1cc18..bf16e17 100644
--- a/exercises/automatic-instrumentation/initial/todobackend-springboot/src/main/java/io/novatec/todobackend/TodobackendApplication.java
+++ b/exercises/automatic-instrumentation/initial/todobackend-springboot/src/main/java/io/novatec/todobackend/TodobackendApplication.java
@@ -87,13 +87,13 @@ String someInternalMethod(String todo){
} catch (InterruptedException e) {
e.printStackTrace();
}
- }
+ }
if(todo.equals("fail")){
System.out.println("Failing ...");
throw new RuntimeException();
-
- }
+
+ }
return todo;
}
diff --git a/exercises/automatic-instrumentation/solution/todobackend-springboot/Dockerfile b/exercises/automatic-instrumentation/solution/todobackend-springboot/Dockerfile
index bcc02e7..5893092 100644
--- a/exercises/automatic-instrumentation/solution/todobackend-springboot/Dockerfile
+++ b/exercises/automatic-instrumentation/solution/todobackend-springboot/Dockerfile
@@ -1,4 +1,4 @@
-FROM docker.io/maven:3-eclipse-temurin-21 as build
+FROM docker.io/maven:3-eclipse-temurin-21 AS build
WORKDIR /workspace/app
COPY pom.xml .
diff --git a/exercises/automatic-instrumentation/solution/todobackend-springboot/pom.xml b/exercises/automatic-instrumentation/solution/todobackend-springboot/pom.xml
index 6d99fd4..7faad91 100644
--- a/exercises/automatic-instrumentation/solution/todobackend-springboot/pom.xml
+++ b/exercises/automatic-instrumentation/solution/todobackend-springboot/pom.xml
@@ -15,7 +15,7 @@
todobackend-automatic-solution
0.0.1-SNAPSHOT
todobackend-automatic-solution
- Novatec Demo Application
+ Demo Application
21
@@ -53,6 +53,20 @@
org.springframework.boot
spring-boot-starter-test
test
+
+
+ org.mockito
+ mockito-core
+
+
+ net.bytebuddy
+ byte-buddy
+
+
+ net.bytebuddy
+ byte-buddy-agent
+
+
io.opentelemetry.instrumentation
diff --git a/exercises/automatic-instrumentation/solution/todobackend-springboot/src/main/java/io/novatec/todobackend/TodobackendApplication.java b/exercises/automatic-instrumentation/solution/todobackend-springboot/src/main/java/io/novatec/todobackend/TodobackendApplication.java
index cf69f70..c655cd2 100644
--- a/exercises/automatic-instrumentation/solution/todobackend-springboot/src/main/java/io/novatec/todobackend/TodobackendApplication.java
+++ b/exercises/automatic-instrumentation/solution/todobackend-springboot/src/main/java/io/novatec/todobackend/TodobackendApplication.java
@@ -91,13 +91,13 @@ String someInternalMethod(@SpanAttribute String todo){
} catch (InterruptedException e) {
e.printStackTrace();
}
- }
+ }
if(todo.equals("fail")){
System.out.println("Failing ...");
throw new RuntimeException();
-
- }
+
+ }
return todo;
}
diff --git a/exercises/otel-in-action/docker-compose.yaml b/exercises/otel-in-action/docker-compose.yaml
index ed3565b..39b5579 100644
--- a/exercises/otel-in-action/docker-compose.yaml
+++ b/exercises/otel-in-action/docker-compose.yaml
@@ -14,7 +14,7 @@ services:
- POSTGRES_DB=mydb
todobackend-springboot:
- image: maeddes/todobackend-springboot:v2404
+ image: ghcr.io/lftraining/lfs148-code-todobackend-springboot:v2404
networks:
- todonet
build:
@@ -37,7 +37,7 @@ services:
- postgresdb
todoui-thymeleaf:
- image: maeddes/todoui-thymeleaf:v2404
+ image: ghcr.io/lftraining/lfs148-code-todoui-thymeleaf:v2404
build:
context: ./todoui-thymeleaf
dockerfile: Dockerfile #-multistage
@@ -56,7 +56,7 @@ services:
- OTEL_LOGS_EXPORTER=none
todoui-flask:
- image: maeddes/todoui-flask:v2404
+ image: ghcr.io/lftraining/lfs148-code-todoui-flask:v2404
build:
context: ./todoui-flask
networks:
@@ -70,7 +70,7 @@ services:
- OTEL_METRICS_EXPORTER=otlp
loadgenerator:
- image: maeddes/simple-generator:v2404
+ image: ghcr.io/lftraining/lfs148-code-simple-generator:v2404
build:
context: ./loadgenerator
networks:
diff --git a/exercises/otel-in-action/todobackend-springboot/Dockerfile b/exercises/otel-in-action/todobackend-springboot/Dockerfile
index bcc02e7..5893092 100644
--- a/exercises/otel-in-action/todobackend-springboot/Dockerfile
+++ b/exercises/otel-in-action/todobackend-springboot/Dockerfile
@@ -1,4 +1,4 @@
-FROM docker.io/maven:3-eclipse-temurin-21 as build
+FROM docker.io/maven:3-eclipse-temurin-21 AS build
WORKDIR /workspace/app
COPY pom.xml .
diff --git a/exercises/otel-in-action/todobackend-springboot/pom.xml b/exercises/otel-in-action/todobackend-springboot/pom.xml
index 79c0651..35daed3 100644
--- a/exercises/otel-in-action/todobackend-springboot/pom.xml
+++ b/exercises/otel-in-action/todobackend-springboot/pom.xml
@@ -15,7 +15,7 @@
todobackend
0.0.1-SNAPSHOT
todobackend
- Novatec Demo Application
+ Demo Application
21
@@ -53,6 +53,20 @@
org.springframework.boot
spring-boot-starter-test
test
+
+
+ org.mockito
+ mockito-core
+
+
+ net.bytebuddy
+ byte-buddy
+
+
+ net.bytebuddy
+ byte-buddy-agent
+
+
io.opentelemetry.instrumentation
diff --git a/exercises/otel-in-action/todobackend-springboot/src/main/java/io/novatec/todobackend/TodobackendApplication.java b/exercises/otel-in-action/todobackend-springboot/src/main/java/io/novatec/todobackend/TodobackendApplication.java
index a595a0f..34629b5 100644
--- a/exercises/otel-in-action/todobackend-springboot/src/main/java/io/novatec/todobackend/TodobackendApplication.java
+++ b/exercises/otel-in-action/todobackend-springboot/src/main/java/io/novatec/todobackend/TodobackendApplication.java
@@ -98,13 +98,13 @@ String someInternalMethod(@SpanAttribute String todo){
} catch (InterruptedException e) {
e.printStackTrace();
}
- }
+ }
if(todo.equals("fail")){
System.out.println("Failing ...");
throw new RuntimeException();
-
- }
+
+ }
return todo;
}
diff --git a/exercises/otel-in-action/todoui-thymeleaf/Dockerfile b/exercises/otel-in-action/todoui-thymeleaf/Dockerfile
index ba32ead..be98665 100644
--- a/exercises/otel-in-action/todoui-thymeleaf/Dockerfile
+++ b/exercises/otel-in-action/todoui-thymeleaf/Dockerfile
@@ -1,4 +1,4 @@
-FROM docker.io/maven:3-eclipse-temurin-21 as build
+FROM docker.io/maven:3-eclipse-temurin-21 AS build
WORKDIR /workspace/app
COPY pom.xml .
diff --git a/exercises/otel-in-action/todoui-thymeleaf/pom.xml b/exercises/otel-in-action/todoui-thymeleaf/pom.xml
index 3dc4994..34f6abb 100644
--- a/exercises/otel-in-action/todoui-thymeleaf/pom.xml
+++ b/exercises/otel-in-action/todoui-thymeleaf/pom.xml
@@ -42,6 +42,20 @@
org.springframework.boot
spring-boot-starter-test
test
+
+
+ org.mockito
+ mockito-core
+
+
+ net.bytebuddy
+ byte-buddy
+
+
+ net.bytebuddy
+ byte-buddy-agent
+
+
-
+-->
+
-
+